summaryrefslogtreecommitdiffstats
path: root/src/vehicles/CarGen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicles/CarGen.cpp')
-rw-r--r--src/vehicles/CarGen.cpp10
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;