summaryrefslogtreecommitdiffstats
path: root/src/vehicles/CarGen.cpp
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2020-08-03 00:03:24 +0200
committerGitHub <noreply@github.com>2020-08-03 00:03:24 +0200
commit4b614333c6778ae49cef688f6ef691dd58384d13 (patch)
treeced50966eaaf373f8733547046baf2bdc558662d /src/vehicles/CarGen.cpp
parentcleanup (diff)
parentMove sdk and eax (diff)
downloadre3-4b614333c6778ae49cef688f6ef691dd58384d13.tar
re3-4b614333c6778ae49cef688f6ef691dd58384d13.tar.gz
re3-4b614333c6778ae49cef688f6ef691dd58384d13.tar.bz2
re3-4b614333c6778ae49cef688f6ef691dd58384d13.tar.lz
re3-4b614333c6778ae49cef688f6ef691dd58384d13.tar.xz
re3-4b614333c6778ae49cef688f6ef691dd58384d13.tar.zst
re3-4b614333c6778ae49cef688f6ef691dd58384d13.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 cb21b918..dd727e2b 100644
--- a/src/vehicles/CarGen.cpp
+++ b/src/vehicles/CarGen.cpp
@@ -28,7 +28,7 @@ void CCarGenerator::SwitchOff()
void CCarGenerator::SwitchOn()
{
- m_nUsesRemaining = -1;
+ m_nUsesRemaining = 255;
m_nTimer = CalcNextGen();
++CTheCarGenerators::CurrentActiveCount;
}
@@ -110,8 +110,13 @@ void CCarGenerator::DoInternalProcessing()
m_nVehicleHandle = CPools::GetVehiclePool()->GetIndex(pCar);
}
}
- if (m_nUsesRemaining < -1) /* I don't think this is a correct comparasion */
+#ifdef FIX_BUGS
+ if (m_nUsesRemaining != 0)
--m_nUsesRemaining;
+#else
+ if (m_nUsesRemaining < -1)
+ --m_nUsesRemaining;
+#endif
m_nTimer = CalcNextGen();
if (m_nUsesRemaining == 0)
--CTheCarGenerators::CurrentActiveCount;