diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-02-11 05:53:29 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-02-11 05:53:29 +0100 |
commit | a6b56e6b7a11aae060229b9066f733ff9e93e3d2 (patch) | |
tree | 68f81fd89673e3430a0b53e40b9beb31d5b3b5b3 | |
parent | Fix setup 4 texts (diff) | |
parent | startproject now depends on librw (diff) | |
download | re3-a6b56e6b7a11aae060229b9066f733ff9e93e3d2.tar re3-a6b56e6b7a11aae060229b9066f733ff9e93e3d2.tar.gz re3-a6b56e6b7a11aae060229b9066f733ff9e93e3d2.tar.bz2 re3-a6b56e6b7a11aae060229b9066f733ff9e93e3d2.tar.lz re3-a6b56e6b7a11aae060229b9066f733ff9e93e3d2.tar.xz re3-a6b56e6b7a11aae060229b9066f733ff9e93e3d2.tar.zst re3-a6b56e6b7a11aae060229b9066f733ff9e93e3d2.zip |
-rw-r--r-- | premake5.lua | 4 | ||||
-rw-r--r-- | src/peds/Ped.cpp | 19 |
2 files changed, 18 insertions, 5 deletions
diff --git a/premake5.lua b/premake5.lua index 08b600e4..a0d54ea7 100644 --- a/premake5.lua +++ b/premake5.lua @@ -236,6 +236,10 @@ project "re3" targetname "re3"
targetdir "bin/%{cfg.platform}/%{cfg.buildcfg}"
+ if(_OPTIONS["with-librw"]) then
+ dependson "librw"
+ end
+
files { addSrcFiles("src") }
files { addSrcFiles("src/animation") }
files { addSrcFiles("src/audio") }
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index e0d60304..28a4e989 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -2448,12 +2448,17 @@ CPed::ProcessControl(void) #ifdef VC_PED_PORTS uint8 flyDir = 0; float feetZ = GetPosition().z - FEET_OFFSET; - if ((obstacleForFlyingZ <= feetZ || obstacleForFlyingOtherDirZ >= 500.0f) && (obstacleForFlyingZ <= feetZ || obstacleForFlyingOtherDirZ <= feetZ)) { - if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingZ < 499.0f) - flyDir = 2; - } else { +#ifdef FIX_BUGS + if (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 501.0f) flyDir = 1; - } + else if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingZ < 500.0f) + flyDir = 2; +#else + if ((obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 500.0f) || (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ > feetZ)) + flyDir = 1; + else if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingZ < 499.0f) + flyDir = 2; +#endif if (flyDir != 0 && !bSomeVCflag1) { SetPosition((flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point)); @@ -2471,6 +2476,10 @@ CPed::ProcessControl(void) forceDir.z = 4.0f; ApplyMoveForce(forceDir); + // What was that for?? It pushes player inside of collision sometimes and kills him. +#ifdef FIX_BUGS + if (!IsPlayer()) +#endif GetMatrix().GetPosition() += 0.25f * offsetToCheck; m_fRotationCur = CGeneral::GetRadianAngleBetweenPoints(offsetToCheck.x, offsetToCheck.y, 0.0f, 0.0f); |