diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index 1502029f5..9900cc031 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -2788,6 +2788,7 @@ void SV_InitLocal (void) extern cvar_t sv_wateraccelerate; extern cvar_t sv_friction; extern cvar_t sv_waterfriction; + extern cvar_t pr_allowbutton1; extern cvar_t pm_bunnyspeedcap; extern cvar_t pm_ktjump; @@ -2891,6 +2892,7 @@ void SV_InitLocal (void) Cvar_Register (&sv_phs, cvargroup_servercontrol); Cvar_Register (&sv_nomsec, cvargroup_serverphysics); + Cvar_Register (&pr_allowbutton1, cvargroup_servercontrol); Cvar_Register (&pausable, cvargroup_servercontrol); diff --git a/engine/server/sv_user.c b/engine/server/sv_user.c index 286f0689e..af98da0be 100644 --- a/engine/server/sv_user.c +++ b/engine/server/sv_user.c @@ -57,6 +57,7 @@ cvar_t voteminimum = {"voteminimum", "4"}; cvar_t votepercent = {"votepercent", "-1"}; cvar_t votetime = {"votetime", "10"}; +cvar_t pr_allowbutton1 = {"pr_allowbutton1", "1", NULL, CVAR_LATCH}; extern cvar_t pm_bunnyspeedcap; extern cvar_t pm_ktjump; @@ -3449,6 +3450,8 @@ void SV_RunCmd (usercmd_t *ucmd, qboolean recurse) sv_player->v.button0 = ucmd->buttons & 1; sv_player->v.button2 = (ucmd->buttons & 2)>>1; + if (pr_allowbutton1.value) //many mods use button1 - it's just a wasted field to many mods. So only work it if the cvar allows. + sv_player->v.button1 = (ucmd->buttons & 4) >> 2; if (ucmd->impulse && SV_FiltureImpulse(ucmd->impulse, host_client->trustlevel)) sv_player->v.impulse = ucmd->impulse;