diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-07-22 06:26:19 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-07-22 19:37:49 +0200 |
commit | 5e34b1efcf4443124beece5ec97082da776df074 (patch) | |
tree | efda81ec77a2f6038d7c997c57ce49d38222af61 /src | |
parent | Fix falling damage (diff) | |
download | re3-5e34b1efcf4443124beece5ec97082da776df074.tar re3-5e34b1efcf4443124beece5ec97082da776df074.tar.gz re3-5e34b1efcf4443124beece5ec97082da776df074.tar.bz2 re3-5e34b1efcf4443124beece5ec97082da776df074.tar.lz re3-5e34b1efcf4443124beece5ec97082da776df074.tar.xz re3-5e34b1efcf4443124beece5ec97082da776df074.tar.zst re3-5e34b1efcf4443124beece5ec97082da776df074.zip |
Diffstat (limited to '')
-rw-r--r-- | src/peds/Ped.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index b52d054c..002cbe3b 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -2362,12 +2362,12 @@ CPed::ProcessControl(void) } else { obstacleForFlyingOtherDirZ = 501.0f; } - uint8 flyDir = 0; + int16 flyDir = 0; float feetZ = GetPosition().z - FEET_OFFSET; #ifdef FIX_BUGS - if (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 501.0f) + if (obstacleForFlyingZ > feetZ && obstacleForFlyingZ < 500.0f) flyDir = 1; - else if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingZ < 500.0f) + else if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingOtherDirZ < 501.0f) flyDir = 2; #else if ((obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 500.0f) || (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ > feetZ)) @@ -2376,8 +2376,8 @@ CPed::ProcessControl(void) flyDir = 2; #endif - if (flyDir != 0 && !bHeadStuckInCollision) { - SetPosition((flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point)); + if (flyDir > 0 && !bHeadStuckInCollision) { + GetMatrix().SetTranslateOnly(flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point); GetMatrix().GetPosition().z += FEET_OFFSET; GetMatrix().UpdateRW(); SetLanding(); |