diff --git a/docs/bfp_cvars_task.md b/docs/bfp_cvars_task.md index 6cab102..8d4d955 100644 --- a/docs/bfp_cvars_task.md +++ b/docs/bfp_cvars_task.md @@ -71,6 +71,7 @@ - [x] ~~cg_lightweightAuras~~ - [x] ~~cg_polygonAura~~ - [x] ~~cg_highPolyAura~~ +- [x] ~~g_noFlight (disables "fly" bind too, original BFP has a leak though)~~ #### Cvar Gametypes: diff --git a/source/game/g_cmds.c b/source/game/g_cmds.c index b46a8ae..8fdab05 100644 --- a/source/game/g_cmds.c +++ b/source/game/g_cmds.c @@ -1597,6 +1597,11 @@ Cmd_BFP_Fly_f */ void Cmd_BFP_Fly_f( gentity_t* ent ) { // BFP - Flight + // BFP - No flight + if ( g_noFlight.integer > 0 ) { + return; + } + if ( ent->client->ps.pm_type != PM_DEAD ) { // do not play the sound in the charging status if ( !( ent->client->ps.pm_flags & PMF_FLYING ) && !( ent->client->ps.pm_flags & PMF_KI_CHARGE ) ) { diff --git a/source/game/g_cvar.h b/source/game/g_cvar.h index fad0c45..941c391 100644 --- a/source/game/g_cvar.h +++ b/source/game/g_cvar.h @@ -70,7 +70,7 @@ G_CVAR( g_meleeRange, "g_meleeRange", "32", 0, 0, qtrue ) // BFP - Melee range G_CVAR( g_chargeDelay, "g_chargeDelay", "750", 0, 0, qtrue ) // BFP - Charge delay G_CVAR( g_hitStun, "g_hitStun", "", 0, 0, qtrue ) // BFP - Hit stun G_CVAR( g_meleeOnly, "g_meleeOnly", "", 0, 0, qtrue ) // BFP - Melee only -G_CVAR( g_noFlight, "g_noFlight", "", 0, 0, qtrue ) // BFP - No flight +G_CVAR( g_noFlight, "g_noFlight", "0", CVAR_SERVERINFO | CVAR_USERINFO | CVAR_LATCH, 0, qtrue ) // BFP - No flight G_CVAR( g_plKillBonusPct, "g_plKillBonusPct", ".1", 0, 0, qtrue ) // BFP - Kill bonus percentage G_CVAR( g_maxSpawnPL, "g_maxSpawnPL", "999", 0, 0, qtrue ) // BFP - Max spawn powerlevel G_CVAR( g_flightCost, "g_flightCost", "50", 0, 0, qtrue ) // BFP - Flight cost