fix autogain not starting where you're aiming from 0 velocity

This commit is contained in:
rtldg 2022-01-02 17:04:47 +00:00
parent c9c6a333a4
commit 42c4550df5

View File

@ -120,6 +120,9 @@ stock Action ObliviousOnPlayerRunCmd(int client, int& buttons, int& impulse, flo
float delta_opt = -normalize_yaw(angles[1] - vel_yaw);
if (get_length_2d(velocity) == 0.0)
delta_opt = 90.0;
if (vel[0] != 0.0 && vel[1] == 0.0)
{
float sign = vel[0] > 0.0 ? -1.0 : 1.0;