mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-25 07:45:40 +00:00
Possible fix of RemoveAndAdd crash
This commit is contained in:
parent
953e4fc4ff
commit
5e34b1efcf
1 changed files with 5 additions and 5 deletions
|
@ -2362,12 +2362,12 @@ CPed::ProcessControl(void)
|
||||||
} else {
|
} else {
|
||||||
obstacleForFlyingOtherDirZ = 501.0f;
|
obstacleForFlyingOtherDirZ = 501.0f;
|
||||||
}
|
}
|
||||||
uint8 flyDir = 0;
|
int16 flyDir = 0;
|
||||||
float feetZ = GetPosition().z - FEET_OFFSET;
|
float feetZ = GetPosition().z - FEET_OFFSET;
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
if (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 501.0f)
|
if (obstacleForFlyingZ > feetZ && obstacleForFlyingZ < 500.0f)
|
||||||
flyDir = 1;
|
flyDir = 1;
|
||||||
else if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingZ < 500.0f)
|
else if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingOtherDirZ < 501.0f)
|
||||||
flyDir = 2;
|
flyDir = 2;
|
||||||
#else
|
#else
|
||||||
if ((obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 500.0f) || (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ > feetZ))
|
if ((obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 500.0f) || (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ > feetZ))
|
||||||
|
@ -2376,8 +2376,8 @@ CPed::ProcessControl(void)
|
||||||
flyDir = 2;
|
flyDir = 2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (flyDir != 0 && !bHeadStuckInCollision) {
|
if (flyDir > 0 && !bHeadStuckInCollision) {
|
||||||
SetPosition((flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point));
|
GetMatrix().SetTranslateOnly(flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point);
|
||||||
GetMatrix().GetPosition().z += FEET_OFFSET;
|
GetMatrix().GetPosition().z += FEET_OFFSET;
|
||||||
GetMatrix().UpdateRW();
|
GetMatrix().UpdateRW();
|
||||||
SetLanding();
|
SetLanding();
|
||||||
|
|
Loading…
Reference in a new issue