diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-06-05 12:00:45 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 20:34:33 +0200 |
commit | f2c8522daa51f49bffa358914802b0220b6f4604 (patch) | |
tree | 5efc4589e2e139237ec371bae6675cef577df229 /src/peds/PedAI.cpp | |
parent | CEntity and C(Vu)Vector fixes and cleanup (diff) | |
download | re3-f2c8522daa51f49bffa358914802b0220b6f4604.tar re3-f2c8522daa51f49bffa358914802b0220b6f4604.tar.gz re3-f2c8522daa51f49bffa358914802b0220b6f4604.tar.bz2 re3-f2c8522daa51f49bffa358914802b0220b6f4604.tar.lz re3-f2c8522daa51f49bffa358914802b0220b6f4604.tar.xz re3-f2c8522daa51f49bffa358914802b0220b6f4604.tar.zst re3-f2c8522daa51f49bffa358914802b0220b6f4604.zip |
Diffstat (limited to 'src/peds/PedAI.cpp')
-rw-r--r-- | src/peds/PedAI.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/peds/PedAI.cpp b/src/peds/PedAI.cpp index d1186723..e204dad9 100644 --- a/src/peds/PedAI.cpp +++ b/src/peds/PedAI.cpp @@ -6401,7 +6401,7 @@ CPed::WarpPedToNearEntityOffScreen(CEntity *warpTo) if (Abs(zCorrectedPos.z - warpToPos.z) < 3.0f || Abs(zCorrectedPos.z - appropriatePos.z) < 3.0f) { appropriatePos.z = zCorrectedPos.z; - if (!TheCamera.IsSphereVisible(appropriatePos, 0.6f, &TheCamera.GetCameraMatrix()) + if (!TheCamera.IsSphereVisible(appropriatePos, 0.6f) && CWorld::GetIsLineOfSightClear(appropriatePos, warpToPos, true, true, false, true, false, false, false) && !CWorld::TestSphereAgainstWorld(appropriatePos, 0.6f, this, true, true, false, true, false, false)) { teleported = true; |