diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-09-28 20:25:14 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-09-30 01:18:03 +0200 |
commit | 9cce324316e0c2794c8509d34c2868f9fdd7f986 (patch) | |
tree | 4d66e99ed843f5ec939fb50d641ee8006049b997 /src/vehicles | |
parent | Merge pull request #722 from theR4K/master (diff) | |
download | re3-9cce324316e0c2794c8509d34c2868f9fdd7f986.tar re3-9cce324316e0c2794c8509d34c2868f9fdd7f986.tar.gz re3-9cce324316e0c2794c8509d34c2868f9fdd7f986.tar.bz2 re3-9cce324316e0c2794c8509d34c2868f9fdd7f986.tar.lz re3-9cce324316e0c2794c8509d34c2868f9fdd7f986.tar.xz re3-9cce324316e0c2794c8509d34c2868f9fdd7f986.tar.zst re3-9cce324316e0c2794c8509d34c2868f9fdd7f986.zip |
Diffstat (limited to 'src/vehicles')
-rw-r--r-- | src/vehicles/CarGen.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp index 84a19b82..130bf1e9 100644 --- a/src/vehicles/CarGen.cpp +++ b/src/vehicles/CarGen.cpp @@ -32,7 +32,7 @@ void CCarGenerator::SwitchOff() void CCarGenerator::SwitchOn() { - m_nUsesRemaining = 255; + m_nUsesRemaining = UINT16_MAX; m_nTimer = CalcNextGen(); ++CTheCarGenerators::CurrentActiveCount; } @@ -143,10 +143,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(); |