diff options
-rw-r--r-- | src/peds/Population.cpp | 7 | ||||
-rw-r--r-- | src/vehicles/Automobile.cpp | 2 |
2 files changed, 4 insertions, 5 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); diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index c2cf26b9..c29c0536 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -4050,7 +4050,7 @@ CAutomobile::GetHeightAboveRoad(void) void CAutomobile::PlayCarHorn(void) { - int r; + uint32 r; if(m_nCarHornTimer != 0) return; |