From d482fbe40c9a96cb163934a8c8093d4a50d8412e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 2 Apr 2004 04:28:40 +0000 Subject: [PATCH] fix assertion when GAMESTATE->m_fSongBeat < 0 --- stepmania/src/LightsManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stepmania/src/LightsManager.cpp b/stepmania/src/LightsManager.cpp index cf3dece003..b474218a08 100644 --- a/stepmania/src/LightsManager.cpp +++ b/stepmania/src/LightsManager.cpp @@ -116,7 +116,8 @@ void LightsManager::Update( float fDeltaTime ) m_LightsState.m_bCabinetLights[cl] = false; int iBeat = (int)(GAMESTATE->m_fSongBeat); - int iTopIndex = iBeat % 4; + int iTopIndex = iBeat; + wrap( iTopIndex, 4 ); switch( iTopIndex ) { case 0: m_LightsState.m_bCabinetLights[LIGHT_MARQUEE_UP_LEFT] = true; break;