summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-01-29 01:32:21 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-01-29 17:23:02 +0100
commitd52b917c549719addf45788413210ea1700cd0d5 (patch)
treefde2b07530985399054640435b638d00bbb4f10c /src/control
parentUpdate build-cmake-conan.yml (diff)
downloadre3-d52b917c549719addf45788413210ea1700cd0d5.tar
re3-d52b917c549719addf45788413210ea1700cd0d5.tar.gz
re3-d52b917c549719addf45788413210ea1700cd0d5.tar.bz2
re3-d52b917c549719addf45788413210ea1700cd0d5.tar.lz
re3-d52b917c549719addf45788413210ea1700cd0d5.tar.xz
re3-d52b917c549719addf45788413210ea1700cd0d5.tar.zst
re3-d52b917c549719addf45788413210ea1700cd0d5.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/Garages.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index afbae005..d6e36875 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -2034,7 +2034,11 @@ float CGarages::FindDoorHeightForMI(int32 mi)
void CGarage::TidyUpGarage()
{
uint32 i = CPools::GetVehiclePool()->GetSize();
+#ifdef FIX_BUGS
while (i--) {
+#else
+ while (--i) {
+#endif
CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i);
if (!pVehicle || !pVehicle->IsCar())
continue;
@@ -2052,7 +2056,11 @@ void CGarage::TidyUpGarage()
void CGarage::TidyUpGarageClose()
{
uint32 i = CPools::GetVehiclePool()->GetSize();
+#ifdef FIX_BUGS
while (i--) {
+#else
+ while (--i) {
+#endif
CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i);
if (!pVehicle || !pVehicle->IsCar())
continue;