Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Merge remote-tracking branch 'origin/master'
* origin/master:
  startproject now depends on librw
  Ped jump teleport/kill fix
  • Loading branch information
Sergeanur committed Feb 11, 2021
2 parents c9f8044 + 1d8d2bd commit a6b56e6b7a11aae060229b9066f733ff9e93e3d2
Showing with 18 additions and 5 deletions.
  1. +4 −0 premake5.lua
  2. +14 −5 src/peds/Ped.cpp
@@ -236,6 +236,10 @@ project "re3"
targetname "re3" targetname "re3"
targetdir "bin/%{cfg.platform}/%{cfg.buildcfg}" targetdir "bin/%{cfg.platform}/%{cfg.buildcfg}"


if(_OPTIONS["with-librw"]) then
dependson "librw"
end

files { addSrcFiles("src") } files { addSrcFiles("src") }
files { addSrcFiles("src/animation") } files { addSrcFiles("src/animation") }
files { addSrcFiles("src/audio") } files { addSrcFiles("src/audio") }
@@ -2448,12 +2448,17 @@ CPed::ProcessControl(void)
#ifdef VC_PED_PORTS #ifdef VC_PED_PORTS
uint8 flyDir = 0; uint8 flyDir = 0;
float feetZ = GetPosition().z - FEET_OFFSET; float feetZ = GetPosition().z - FEET_OFFSET;
if ((obstacleForFlyingZ <= feetZ || obstacleForFlyingOtherDirZ >= 500.0f) && (obstacleForFlyingZ <= feetZ || obstacleForFlyingOtherDirZ <= feetZ)) { #ifdef FIX_BUGS
if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingZ < 499.0f) if (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 501.0f)
flyDir = 2;
} else {
flyDir = 1; 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) { if (flyDir != 0 && !bSomeVCflag1) {
SetPosition((flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point)); SetPosition((flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point));
@@ -2471,6 +2476,10 @@ CPed::ProcessControl(void)
forceDir.z = 4.0f; forceDir.z = 4.0f;
ApplyMoveForce(forceDir); 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; GetMatrix().GetPosition() += 0.25f * offsetToCheck;


m_fRotationCur = CGeneral::GetRadianAngleBetweenPoints(offsetToCheck.x, offsetToCheck.y, 0.0f, 0.0f); m_fRotationCur = CGeneral::GetRadianAngleBetweenPoints(offsetToCheck.x, offsetToCheck.y, 0.0f, 0.0f);

0 comments on commit a6b56e6

Please sign in to comment.