make sure the z isn't scaled just in case for prespeed_ez_vel

This commit is contained in:
rtldg 2022-01-20 18:26:36 +00:00
parent dd0059f15f
commit 00000008fd

View File

@ -1308,9 +1308,11 @@ public Action Shavit_OnUserCmdPre(int client, int &buttons, int &impulse, float
float fSpeedXY = (SquareRoot(Pow(fSpeed[0], 2.0) + Pow(fSpeed[1], 2.0)));
float fScale = (prespeed_ez_vel / fSpeedXY);
if (fScale > 1.0)
if (fSpeedXY >= 1.0 && fScale > 1.0)
{
float z = fSpeed[2];
ScaleVector(fSpeed, fScale);
fSpeed[2] = z;
DumbSetVelocity(client, fSpeed);
}
}