summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-07-22 19:56:15 +0200
committerSergeanur <s.anureev@yandex.ua>2021-07-22 19:56:15 +0200
commit1d1f10d68ce464f09808760c1c693f111406e5dd (patch)
tree382e7858a86100000b6524d419c6b8e841a77380
parentfix garbage data written in garage save block (diff)
downloadre3-1d1f10d68ce464f09808760c1c693f111406e5dd.tar
re3-1d1f10d68ce464f09808760c1c693f111406e5dd.tar.gz
re3-1d1f10d68ce464f09808760c1c693f111406e5dd.tar.bz2
re3-1d1f10d68ce464f09808760c1c693f111406e5dd.tar.lz
re3-1d1f10d68ce464f09808760c1c693f111406e5dd.tar.xz
re3-1d1f10d68ce464f09808760c1c693f111406e5dd.tar.zst
re3-1d1f10d68ce464f09808760c1c693f111406e5dd.zip
-rw-r--r--src/peds/Ped.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 9be58d11..8d0fbbe8 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -2474,12 +2474,12 @@ CPed::ProcessControl(void)
obstacleForFlyingOtherDirZ = 501.0f;
}
#ifdef VC_PED_PORTS
- 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))
@@ -2488,8 +2488,8 @@ CPed::ProcessControl(void)
flyDir = 2;
#endif
- if (flyDir != 0 && !bSomeVCflag1) {
- SetPosition((flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point));
+ if (flyDir > 0 && !bSomeVCflag1) {
+ GetMatrix().SetTranslateOnly((flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point));
GetMatrix().GetPosition().z += FEET_OFFSET;
GetMatrix().UpdateRW();
SetLanding();
@@ -3188,7 +3188,7 @@ CPed::ProcessEntityCollision(CEntity *collidingEnt, CColPoint *collidingPoints)
lowerSpeedLimit *= 1.5f;
}
CAnimBlendAssociation *fallAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL);
- if (!bWasStanding && speed > upperSpeedLimit && (/*!bPushedAlongByCar ||*/ m_vecMoveSpeed.z < lowerSpeedLimit)
+ if (!bWasStanding && ((speed > upperSpeedLimit /* ||!bPushedAlongByCar*/) || (m_vecMoveSpeed.z < lowerSpeedLimit))
&& m_pCollidingEntity != collidingEnt) {
float damage = 100.0f * Max(speed - 0.25f, 0.0f);