Fixed bug where joystick movement was ignoring the player movement lock.

This commit is contained in:
blendogames 2024-01-30 19:48:23 -08:00
parent 3ee852d7e2
commit 8675f35794
2 changed files with 5 additions and 2 deletions

View file

@ -303,7 +303,7 @@ void CL_BaseMove (usercmd_t *cmd)
if (cl.frame.playerstate.stats[STAT_MOVESLOW] > 0)
{
sidespeed = 0;
forwardspeed *= 0.4;
forwardspeed *= .5f; //BC 1/30/2024 changed this from .4 to .5 because it was causing issues
}
#endif

View file

@ -968,8 +968,11 @@ void IN_JoyMove (usercmd_t *cmd)
else
{
// user wants forward control to be forward control
if (fabs(fAxisValue) > joy_forwardthreshold->value)
if (fabs(fAxisValue) > joy_forwardthreshold->value && cl.frame.playerstate.stats[STAT_FREEZE] <= 0 /*BC 1/30/2024 don't allow joystick movement during stat_freeze*/ )
{
if (cl.frame.playerstate.stats[STAT_MOVESLOW]) //BC 1/30/2024 slow down movement during stat_moveslow
speed *= .5f;
cmd->forwardmove += (fAxisValue * joy_forwardsensitivity->value) * speed * cl_forwardspeed->value;
}
}