fix wrong lights flash on test screen

This commit is contained in:
Chris Danford
2004-04-07 02:27:11 +00:00
parent d93f758024
commit 3c62c62a0e
+4 -1
View File
@@ -18,6 +18,7 @@
#include "RageUtil.h"
#include "GameInput.h" // for GameController
#include "InputMapper.h"
#include "GameDef.h"
static const CString CabinetLightNames[NUM_CABINET_LIGHTS] = {
@@ -239,11 +240,13 @@ void LightsManager::Update( float fDeltaTime )
{
int iSec = (int)RageTimer::GetTimeSinceStart();
int iNumGameButtonsToShow = GAMESTATE->GetCurrentGameDef()->GetNumGameplayButtons();
FOREACH_GameController( gc )
{
FOREACH_GameButton( gb )
{
bool bOn = (iSec%MAX_GAME_BUTTONS)==gb;
bool bOn = gb==(iSec%iNumGameButtonsToShow);
m_LightsState.m_bGameButtonLights[gc][gb] = bOn;
}
}