summaryrefslogtreecommitdiffstats
path: root/src/peds/Population.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-02-28 15:18:48 +0100
committerSergeanur <s.anureev@yandex.ua>2021-06-24 20:32:39 +0200
commit8488dc791aa0f14958c2ac46bbf45e9812e14331 (patch)
treef3a0fd3b79f36c70b02722e4476f2e0f5271a76f /src/peds/Population.cpp
parentfix postfx (diff)
downloadre3-8488dc791aa0f14958c2ac46bbf45e9812e14331.tar
re3-8488dc791aa0f14958c2ac46bbf45e9812e14331.tar.gz
re3-8488dc791aa0f14958c2ac46bbf45e9812e14331.tar.bz2
re3-8488dc791aa0f14958c2ac46bbf45e9812e14331.tar.lz
re3-8488dc791aa0f14958c2ac46bbf45e9812e14331.tar.xz
re3-8488dc791aa0f14958c2ac46bbf45e9812e14331.tar.zst
re3-8488dc791aa0f14958c2ac46bbf45e9812e14331.zip
Diffstat (limited to '')
-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 a0bf8be6..5bbb7c4b 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -945,10 +945,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);