summaryrefslogtreecommitdiffstats
path: root/src/vehicles/CarGen.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-10-04 21:39:54 +0200
committereray orçunus <erayorcunus@gmail.com>2020-10-08 16:58:18 +0200
commitfec01aeff1daa891d754bd249f053652788d6f8e (patch)
treea66e4fb54a910961732c41f93436e284b8b3ac0c /src/vehicles/CarGen.cpp
parentCdStreamPosix: fix type issues (diff)
downloadre3-fec01aeff1daa891d754bd249f053652788d6f8e.tar
re3-fec01aeff1daa891d754bd249f053652788d6f8e.tar.gz
re3-fec01aeff1daa891d754bd249f053652788d6f8e.tar.bz2
re3-fec01aeff1daa891d754bd249f053652788d6f8e.tar.lz
re3-fec01aeff1daa891d754bd249f053652788d6f8e.tar.xz
re3-fec01aeff1daa891d754bd249f053652788d6f8e.tar.zst
re3-fec01aeff1daa891d754bd249f053652788d6f8e.zip
Diffstat (limited to 'src/vehicles/CarGen.cpp')
-rw-r--r--src/vehicles/CarGen.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp
index b0fa91a4..598b8342 100644
--- a/src/vehicles/CarGen.cpp
+++ b/src/vehicles/CarGen.cpp
@@ -28,8 +28,13 @@ uint32 CTheCarGenerators::CurrentActiveCount;
void CCarGenerator::SwitchOff()
{
- m_nUsesRemaining = 0;
- --CTheCarGenerators::CurrentActiveCount;
+#ifdef FIX_BUGS
+ if (m_nUsesRemaining != 0)
+#endif
+ {
+ m_nUsesRemaining = 0;
+ --CTheCarGenerators::CurrentActiveCount;
+ }
}
void CCarGenerator::SwitchOn()