aboutsummaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-05-27 16:50:15 +0300
committerSergeanur <s.anureev@yandex.ua>2021-06-24 21:32:43 +0300
commit2ad3a75be5ba34d1376ad7c3fa7fc94adeaa32ac (patch)
tree15efc250158c790c0b73e44a7692dc21b0d9cc9c /src/peds
parent50058371efaf4c5713b7a608db0c7990ec3d78a6 (diff)
Fix IsSphereVisible calls
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/PedAI.cpp4
-rw-r--r--src/peds/Population.cpp3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/peds/PedAI.cpp b/src/peds/PedAI.cpp
index 7f7120af..f1c753ec 100644
--- a/src/peds/PedAI.cpp
+++ b/src/peds/PedAI.cpp
@@ -5362,7 +5362,7 @@ CPed::WarpPedToNearLeaderOffScreen(void)
continue;
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;
@@ -5396,7 +5396,7 @@ CPed::WarpPedToNearEntityOffScreen(CEntity *warpTo)
continue;
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;
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp
index 906ee6e9..edb5958d 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -706,8 +706,7 @@ CPopulation::AddToPopulation(float minDist, float maxDist, float minDistOffScree
generatedCoors.z = Max(generatedCoors.z, groundZ);
}
bool farEnoughToAdd = true;
- CMatrix mat(TheCamera.GetCameraMatrix());
- if (TheCamera.IsSphereVisible(generatedCoors, 2.0f, &mat)) {
+ if (TheCamera.IsSphereVisible(generatedCoors, 2.0f)) {
if (PedCreationDistMultiplier() * MIN_CREATION_DIST > (generatedCoors - playerCentreOfWorld).Magnitude2D())
farEnoughToAdd = false;
}