mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-11-05 04:25:55 +00:00
Ped jump teleport/kill fix
This commit is contained in:
parent
94eed33940
commit
775db94a96
|
@ -2336,12 +2336,17 @@ CPed::ProcessControl(void)
|
|||
}
|
||||
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 && !bHeadStuckInCollision) {
|
||||
SetPosition((flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point));
|
||||
|
@ -2358,6 +2363,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);
|
||||
|
|
Loading…
Reference in a new issue