From f2c8522daa51f49bffa358914802b0220b6f4604 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 5 Jun 2021 13:00:45 +0300 Subject: Fix IsSphereVisible calls --- src/peds/PedAI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/peds') 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; -- cgit v1.2.3