fixed cargen

This commit is contained in:
Nikolay Korolev 2020-09-28 21:25:14 +03:00
parent 20167f341e
commit 742ca47a43
1 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ void CCarGenerator::SwitchOff()
void CCarGenerator::SwitchOn()
{
m_nUsesRemaining = 255;
m_nUsesRemaining = UINT16_MAX;
m_nTimer = CalcNextGen();
++CTheCarGenerators::CurrentActiveCount;
}
@ -111,10 +111,10 @@ void CCarGenerator::DoInternalProcessing()
}
}
#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();