mirror of
https://github.com/halpz/re3.git
synced 2025-07-26 16:22:44 +00:00
Fix IsSphereVisible calls
This commit is contained in:
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user