simplify
This commit is contained in:
@@ -591,18 +591,11 @@ void GameSoundManager::Update( float fDeltaTime )
|
|||||||
NoteData &lights = g_Playing->m_Lights;
|
NoteData &lights = g_Playing->m_Lights;
|
||||||
if( lights.GetNumTracks() > 0 ) // lights data was loaded
|
if( lights.GetNumTracks() > 0 ) // lights data was loaded
|
||||||
{
|
{
|
||||||
bool bCrossedABeat = false;
|
|
||||||
|
|
||||||
const float fSongBeat = GAMESTATE->m_fLightSongBeat;
|
const float fSongBeat = GAMESTATE->m_fLightSongBeat;
|
||||||
const int iSongRow = BeatToNoteRowNotRounded( fSongBeat );
|
const int iSongRow = BeatToNoteRowNotRounded( fSongBeat );
|
||||||
|
|
||||||
static int iRowLastCrossed = 0;
|
static int iRowLastCrossed = 0;
|
||||||
|
|
||||||
float fBeatLast = roundf(NoteRowToBeat(iRowLastCrossed));
|
|
||||||
float fBeatNow = roundf(NoteRowToBeat(iSongRow));
|
|
||||||
|
|
||||||
bCrossedABeat = fBeatLast != fBeatNow;
|
|
||||||
|
|
||||||
FOREACH_CabinetLight( cl )
|
FOREACH_CabinetLight( cl )
|
||||||
{
|
{
|
||||||
// for each index we crossed since the last update:
|
// for each index we crossed since the last update:
|
||||||
|
|||||||
Reference in New Issue
Block a user