diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-07-24 19:43:51 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-07-24 20:02:55 +0200 |
commit | ad6094ca1d9b54b32ae8153c771e8e6f9308103a (patch) | |
tree | 929528298d437e2868071683228743f47accc173 /src/vehicles | |
parent | Merge pull request #661 from erorcun/miami (diff) | |
download | re3-ad6094ca1d9b54b32ae8153c771e8e6f9308103a.tar re3-ad6094ca1d9b54b32ae8153c771e8e6f9308103a.tar.gz re3-ad6094ca1d9b54b32ae8153c771e8e6f9308103a.tar.bz2 re3-ad6094ca1d9b54b32ae8153c771e8e6f9308103a.tar.lz re3-ad6094ca1d9b54b32ae8153c771e8e6f9308103a.tar.xz re3-ad6094ca1d9b54b32ae8153c771e8e6f9308103a.tar.zst re3-ad6094ca1d9b54b32ae8153c771e8e6f9308103a.zip |
Diffstat (limited to 'src/vehicles')
-rw-r--r-- | src/vehicles/CarGen.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp index 4b83cc81..84a19b82 100644 --- a/src/vehicles/CarGen.cpp +++ b/src/vehicles/CarGen.cpp @@ -32,7 +32,7 @@ void CCarGenerator::SwitchOff() void CCarGenerator::SwitchOn() { - m_nUsesRemaining = -1; + m_nUsesRemaining = 255; m_nTimer = CalcNextGen(); ++CTheCarGenerators::CurrentActiveCount; } @@ -141,8 +141,14 @@ void CCarGenerator::DoInternalProcessing() } CVisibilityPlugins::SetClumpAlpha(pVehicle->GetClump(), 0); m_nVehicleHandle = CPools::GetVehiclePool()->GetIndex(pVehicle); - if (m_nUsesRemaining < -1) /* I don't think this is a correct comparasion */ + /* 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; |