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-04 21:39:54 +0200
commit8c170a62ee5960bcb752630807101efd67d76e00 (patch)
tree1f8d60c06806a7dc8a5d398ac4282bf32f9b075f /src/vehicles/CarGen.cpp
parentMerge pull request #738 from erorcun/master (diff)
downloadre3-8c170a62ee5960bcb752630807101efd67d76e00.tar
re3-8c170a62ee5960bcb752630807101efd67d76e00.tar.gz
re3-8c170a62ee5960bcb752630807101efd67d76e00.tar.bz2
re3-8c170a62ee5960bcb752630807101efd67d76e00.tar.lz
re3-8c170a62ee5960bcb752630807101efd67d76e00.tar.xz
re3-8c170a62ee5960bcb752630807101efd67d76e00.tar.zst
re3-8c170a62ee5960bcb752630807101efd67d76e00.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 338eaba4..9bab9640 100644
--- a/src/vehicles/CarGen.cpp
+++ b/src/vehicles/CarGen.cpp
@@ -22,8 +22,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()