normalize angle difference just in case

This commit is contained in:
rtldg 2022-01-15 13:02:45 +00:00
parent e43c011711
commit d1b2ffd461

View File

@ -542,7 +542,8 @@ public Action OnPlayerRunCmd(int client, int& buttons, int& impulse, float vel[3
} }
else if (type == AutostrafeType_Basic) else if (type == AutostrafeType_Basic)
{ {
float delta = angles[1] - g_flOldYawAngle[client]; float delta = AngleNormalize(angles[1] - g_flOldYawAngle[client]);
if (delta < 0.0) if (delta < 0.0)
{ {
vel[1] = g_fMaxMove; vel[1] = g_fMaxMove;