mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Make the "speedkey" act as "slowkey" when "always run" is on.
A bit of a hack, this should really be controlled by a separate "cl_alwaysrun" cvar, but lets stick to this for backward compatibility for now. git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@797 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
62e3f20e24
commit
668a3c4959
2 changed files with 11 additions and 7 deletions
|
@ -246,7 +246,7 @@ void CL_AdjustAngles (void)
|
|||
float speed;
|
||||
float up, down;
|
||||
|
||||
if (in_speed.state & 1)
|
||||
if ((cl_forwardspeed.value > 200) ^ (in_speed.state & 1))
|
||||
speed = host_frametime * cl_anglespeedkey.value;
|
||||
else
|
||||
speed = host_frametime;
|
||||
|
@ -324,7 +324,11 @@ void CL_BaseMove (usercmd_t *cmd)
|
|||
//
|
||||
// adjust for speed key
|
||||
//
|
||||
if (in_speed.state & 1)
|
||||
if (cl_forwardspeed.value > 200 && cl_movespeedkey.value != 0)
|
||||
{
|
||||
cmd->forwardmove /= cl_movespeedkey.value;
|
||||
}
|
||||
if ((cl_forwardspeed.value > 200) ^ (in_speed.state & 1))
|
||||
{
|
||||
cmd->forwardmove *= cl_movespeedkey.value;
|
||||
cmd->sidemove *= cl_movespeedkey.value;
|
||||
|
|
10
Quake/menu.c
10
Quake/menu.c
|
@ -1037,15 +1037,15 @@ void M_AdjustSliders (int dir)
|
|||
break;
|
||||
|
||||
case OPT_ALWAYRUN: // always run
|
||||
if (cl_forwardspeed.value > 200)
|
||||
if (cl_forwardspeed.value > 200 || cl_movespeedkey.value <= 1)
|
||||
{
|
||||
Cvar_Set ("cl_forwardspeed", "200");
|
||||
Cvar_Set ("cl_backspeed", "200");
|
||||
Cvar_SetValue ("cl_forwardspeed", 200);
|
||||
Cvar_SetValue ("cl_backspeed", 200);
|
||||
}
|
||||
else
|
||||
{
|
||||
Cvar_Set ("cl_forwardspeed", "400");
|
||||
Cvar_Set ("cl_backspeed", "400");
|
||||
Cvar_SetValue ("cl_forwardspeed", 200 * cl_movespeedkey.value);
|
||||
Cvar_SetValue ("cl_backspeed", 200 * cl_movespeedkey.value);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue