Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Make cars and peds to not despawn when you look away
- Loading branch information
Showing
with
8 additions
and
1 deletion.
-
+5
−1
src/control/CarCtrl.cpp
-
+3
−0
src/peds/Population.cpp
There are no files selected for viewing
|
|
@@ -731,7 +731,11 @@ CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle) |
|
}
|
|
}
|
|
float distanceToPlayer = (pVehicle->GetPosition() - vecPlayerPos).Magnitude2D();
|
|
float distanceToPlayer = (pVehicle->GetPosition() - vecPlayerPos).Magnitude2D();
|
|
float threshold = 50.0f;
|
|
float threshold = 50.0f;
|
|
if (pVehicle->GetIsOnScreen() ||
|
|
if (
|
|
|
|
#if defined(FREE_CAM) && !defined(SQUEEZE_PERFORAMNCE)
|
|
|
|
CCamera::bFreeCam ||
|
|
|
|
#endif
|
|
|
|
pVehicle->GetIsOnScreen() ||
|
|
TheCamera.Cams[TheCamera.ActiveCam].LookingLeft ||
|
|
TheCamera.Cams[TheCamera.ActiveCam].LookingLeft ||
|
|
TheCamera.Cams[TheCamera.ActiveCam].LookingRight ||
|
|
TheCamera.Cams[TheCamera.ActiveCam].LookingRight ||
|
|
TheCamera.Cams[TheCamera.ActiveCam].LookingBehind ||
|
|
TheCamera.Cams[TheCamera.ActiveCam].LookingBehind ||
|
|
|
|
|
|
@@ -1127,6 +1127,9 @@ CPopulation::ManagePopulation(void) |
|
if (PedCreationDistMultiplier() * (PED_REMOVE_DIST_SPECIAL * TheCamera.GenerationDistMultiplier) < dist
|
|
if (PedCreationDistMultiplier() * (PED_REMOVE_DIST_SPECIAL * TheCamera.GenerationDistMultiplier) < dist
|
|
|| (!ped->bCullExtraFarAway && PedCreationDistMultiplier() * PED_REMOVE_DIST * TheCamera.GenerationDistMultiplier < dist)
|
|
|| (!ped->bCullExtraFarAway && PedCreationDistMultiplier() * PED_REMOVE_DIST * TheCamera.GenerationDistMultiplier < dist)
|
|
|| (PedCreationDistMultiplier() * (MIN_CREATION_DIST + CREATION_RANGE) * OFFSCREEN_CREATION_MULT < dist
|
|
|| (PedCreationDistMultiplier() * (MIN_CREATION_DIST + CREATION_RANGE) * OFFSCREEN_CREATION_MULT < dist
|
|
|
|
#if defined(FREE_CAM) && !defined(SQUEEZE_PERFORAMNCE)
|
|
|
|
&& !CCamera::bFreeCam
|
|
|
|
#endif
|
|
&& !ped->GetIsOnScreen()
|
|
&& !ped->GetIsOnScreen()
|
|
&& TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_SNIPER
|
|
&& TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_SNIPER
|
|
&& TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_SNIPER_RUNABOUT
|
|
&& TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_SNIPER_RUNABOUT
|
|
|
|