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:45:48 +0200 |
commit | 1558788df122d9c8df23a8127572d4bfcf68ca15 (patch) | |
tree | 8898ae718f134ac4ba376b9063fadd306152c1c1 /src/peds/PedAI.cpp | |
parent | CEntity and C(Vu)Vector fixes and cleanup (diff) | |
download | re3-1558788df122d9c8df23a8127572d4bfcf68ca15.tar re3-1558788df122d9c8df23a8127572d4bfcf68ca15.tar.gz re3-1558788df122d9c8df23a8127572d4bfcf68ca15.tar.bz2 re3-1558788df122d9c8df23a8127572d4bfcf68ca15.tar.lz re3-1558788df122d9c8df23a8127572d4bfcf68ca15.tar.xz re3-1558788df122d9c8df23a8127572d4bfcf68ca15.tar.zst re3-1558788df122d9c8df23a8127572d4bfcf68ca15.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 040fffd9..73522fe3 100644 --- a/src/peds/PedAI.cpp +++ b/src/peds/PedAI.cpp @@ -6446,7 +6446,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; |