summaryrefslogtreecommitdiffstats
path: root/src/vehicles/CarGen.cpp
diff options
context:
space:
mode:
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()