summaryrefslogtreecommitdiffstats
path: root/src/vehicles/CarGen.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-09-30 01:44:02 +0200
committereray orçunus <erayorcunus@gmail.com>2020-09-30 01:44:02 +0200
commitf740588780897a2d9d0b29724d617b0eaa9b5025 (patch)
tree2d9bb7a9ae9d10a2ebfceba7179b47c249b3e19a /src/vehicles/CarGen.cpp
parentPopulation and many small classes done, mouse AUX buttons, Frontend, Hud, fixes (diff)
parentMerge remote-tracking branch 'origin/master' into miami (diff)
downloadre3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar
re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar.gz
re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar.bz2
re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar.lz
re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar.xz
re3-f740588780897a2d9d0b29724d617b0eaa9b5025.tar.zst
re3-f740588780897a2d9d0b29724d617b0eaa9b5025.zip
Diffstat (limited to 'src/vehicles/CarGen.cpp')
-rw-r--r--src/vehicles/CarGen.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp
index 855d00b1..97955595 100644
--- a/src/vehicles/CarGen.cpp
+++ b/src/vehicles/CarGen.cpp
@@ -34,7 +34,7 @@ void CCarGenerator::SwitchOff()
void CCarGenerator::SwitchOn()
{
- m_nUsesRemaining = 255;
+ m_nUsesRemaining = UINT16_MAX;
m_nTimer = CalcNextGen();
++CTheCarGenerators::CurrentActiveCount;
}
@@ -141,10 +141,10 @@ void CCarGenerator::DoInternalProcessing()
m_nVehicleHandle = CPools::GetVehiclePool()->GetIndex(pVehicle);
/* I don't think this is a correct comparasion */
#ifdef FIX_BUGS
- if (m_nUsesRemaining != 0)
+ if (m_nUsesRemaining < UINT16_MAX)
--m_nUsesRemaining;
#else
- if (m_nUsesRemaining < -1)
+ if (m_nUsesRemaining < ~0)
--m_nUsesRemaining;
#endif
m_nTimer = CalcNextGen();