summaryrefslogtreecommitdiffstats
path: root/src/peds/Population.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-02-28 13:50:51 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-02-28 13:50:51 +0100
commita311f643f9a0a7377e27f49b18739fe5de5a6291 (patch)
tree97b5e9deb2d81827e8e229d9e64bfce167132ea0 /src/peds/Population.cpp
parentFix muzzleflash rotation (diff)
downloadre3-a311f643f9a0a7377e27f49b18739fe5de5a6291.tar
re3-a311f643f9a0a7377e27f49b18739fe5de5a6291.tar.gz
re3-a311f643f9a0a7377e27f49b18739fe5de5a6291.tar.bz2
re3-a311f643f9a0a7377e27f49b18739fe5de5a6291.tar.lz
re3-a311f643f9a0a7377e27f49b18739fe5de5a6291.tar.xz
re3-a311f643f9a0a7377e27f49b18739fe5de5a6291.tar.zst
re3-a311f643f9a0a7377e27f49b18739fe5de5a6291.zip
Diffstat (limited to 'src/peds/Population.cpp')
-rw-r--r--src/peds/Population.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp
index 5603e2c6..d7a545d8 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -911,10 +911,9 @@ CPopulation::MoveCarsAndPedsOutOfAbandonedZones()
void
CPopulation::ConvertAllObjectsToDummyObjects()
{
- int poolSize = CPools::GetObjectPool()->GetSize();
- for (int poolIndex = poolSize - 1; poolIndex >= 0; poolIndex--) {
-
- CObject *obj = CPools::GetObjectPool()->GetSlot(poolIndex);
+ uint32 i = CPools::GetObjectPool()->GetSize();
+ while(i--) {
+ CObject *obj = CPools::GetObjectPool()->GetSlot(i);
if (obj) {
if (obj->CanBeDeleted())
ConvertToDummyObject(obj);