summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-07-31 19:07:29 +0200
committerGitHub <noreply@github.com>2021-07-31 19:07:29 +0200
commit232b5a04bad3ff2fc3a054b790918042082c7beb (patch)
treef7105f1270ef1c86b9f0160d604ca23745f734de /src/peds
parentMerge pull request #1248 from davicr/radar-cutscene-bugfix (diff)
parentMake cars and peds to not despawn when you look away (diff)
downloadre3-232b5a04bad3ff2fc3a054b790918042082c7beb.tar
re3-232b5a04bad3ff2fc3a054b790918042082c7beb.tar.gz
re3-232b5a04bad3ff2fc3a054b790918042082c7beb.tar.bz2
re3-232b5a04bad3ff2fc3a054b790918042082c7beb.tar.lz
re3-232b5a04bad3ff2fc3a054b790918042082c7beb.tar.xz
re3-232b5a04bad3ff2fc3a054b790918042082c7beb.tar.zst
re3-232b5a04bad3ff2fc3a054b790918042082c7beb.zip
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/Population.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp
index 1d2a5798..fcabff91 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -1126,13 +1126,16 @@ CPopulation::ManagePopulation(void)
bool pedIsFarAway = false;
if (PedCreationDistMultiplier() * (PED_REMOVE_DIST_SPECIAL * TheCamera.GenerationDistMultiplier) < dist
|| (!ped->bCullExtraFarAway && PedCreationDistMultiplier() * PED_REMOVE_DIST * TheCamera.GenerationDistMultiplier < dist)
+#ifndef EXTENDED_OFFSCREEN_DESPAWN_RANGE
|| (PedCreationDistMultiplier() * (MIN_CREATION_DIST + CREATION_RANGE) * OFFSCREEN_CREATION_MULT < dist
&& !ped->GetIsOnScreen()
&& TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_SNIPER
&& TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_SNIPER_RUNABOUT
&& !TheCamera.Cams[TheCamera.ActiveCam].LookingLeft
&& !TheCamera.Cams[TheCamera.ActiveCam].LookingRight
- && !TheCamera.Cams[TheCamera.ActiveCam].LookingBehind))
+ && !TheCamera.Cams[TheCamera.ActiveCam].LookingBehind)
+#endif
+ )
pedIsFarAway = true;
if (!pedIsFarAway)