Fix AI-driver horn SFX length at high FPS

This commit is contained in:
Veyrdite 2021-08-01 15:18:54 +10:00
parent 5d19085dfe
commit 9282db1e8f
2 changed files with 13 additions and 1 deletions

View File

@ -5740,8 +5740,14 @@ CAutomobile::ShowAllComps(void)
void void
CAutomobile::ReduceHornCounter(void) CAutomobile::ReduceHornCounter(void)
{ {
#ifdef FIX_BUGS
// Make horns last longer (only used by AI drivers?)
if(m_nCarHornTimer != 0 && CTimer::GetLogicalFramesPassed())
m_nCarHornTimer--;
#else
if(m_nCarHornTimer != 0) if(m_nCarHornTimer != 0)
m_nCarHornTimer--; m_nCarHornTimer--;
#endif
} }
void void

View File

@ -2941,8 +2941,14 @@ CBike::SetupModelNodes(void)
void void
CBike::ReduceHornCounter(void) CBike::ReduceHornCounter(void)
{ {
if(m_nCarHornTimer != 0) #ifdef FIX_BUGS
// Make horns last longer (only used by AI drivers?)
if(m_nCarHornTimer != 0 && CTimer::GetLogicalFramesPassed())
m_nCarHornTimer--; m_nCarHornTimer--;
#else
if(m_nCarHornTimer != 0)
m_nCarHornTimer--;
#endif
} }
#ifdef COMPATIBLE_SAVES #ifdef COMPATIBLE_SAVES