Fix IsSphereVisible calls

This commit is contained in:
Sergeanur
2021-06-05 13:00:45 +03:00
parent 93e9929925
commit f2c8522daa
3 changed files with 11 additions and 11 deletions

View File

@ -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;