mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-06 18:08:26 +00:00
make sure the z isn't scaled just in case for prespeed_ez_vel
This commit is contained in:
parent
dd0059f15f
commit
00000008fd
@ -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 fSpeedXY = (SquareRoot(Pow(fSpeed[0], 2.0) + Pow(fSpeed[1], 2.0)));
|
||||||
float fScale = (prespeed_ez_vel / fSpeedXY);
|
float fScale = (prespeed_ez_vel / fSpeedXY);
|
||||||
|
|
||||||
if (fScale > 1.0)
|
if (fSpeedXY >= 1.0 && fScale > 1.0)
|
||||||
{
|
{
|
||||||
|
float z = fSpeed[2];
|
||||||
ScaleVector(fSpeed, fScale);
|
ScaleVector(fSpeed, fScale);
|
||||||
|
fSpeed[2] = z;
|
||||||
DumbSetVelocity(client, fSpeed);
|
DumbSetVelocity(client, fSpeed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user