button1 works - pr_allowbutton0 to disable
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@80 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
912fe34e6a
commit
6986cfd401
2 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue