simplify
This commit is contained in:
@@ -742,18 +742,25 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
else m_Background.TurnDangerOff();
|
else m_Background.TurnDangerOff();
|
||||||
|
|
||||||
// check for individual fail
|
// check for individual fail
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( pn=0; pn<NUM_PLAYERS; pn++ ) {
|
||||||
if( GAMESTATE->IsPlayerEnabled(p) )
|
if( !GAMESTATE->IsPlayerEnabled(pn) )
|
||||||
if( m_pLifeMeter[p]->IsFailing() && GAMESTATE->m_fSecondsBeforeFail[p] == -1 ) // not yet failed
|
continue;
|
||||||
if( !AllFailedEarlier() ) // if not the last one to fail
|
if( !m_pLifeMeter[pn]->IsFailing())
|
||||||
{
|
continue; /* hasn't failed */
|
||||||
// kill them!
|
|
||||||
GAMESTATE->m_fSecondsBeforeFail[p] = GAMESTATE->GetElapsedSeconds();
|
if( GAMESTATE->m_fSecondsBeforeFail[pn] != -1 )
|
||||||
m_soundOniDie.PlayRandom();
|
continue; /* failed and is already dead */
|
||||||
ShowOniGameOver((PlayerNumber)p);
|
|
||||||
m_Player[p].Init(); // remove all notes and scoring
|
if( !AllFailedEarlier() ) // if not the last one to fail
|
||||||
m_Player[p].FadeToFail(); // tell the NoteField to fade to white
|
{
|
||||||
}
|
// kill them!
|
||||||
|
GAMESTATE->m_fSecondsBeforeFail[pn] = GAMESTATE->GetElapsedSeconds();
|
||||||
|
m_soundOniDie.PlayRandom();
|
||||||
|
ShowOniGameOver((PlayerNumber)pn);
|
||||||
|
m_Player[pn].Init(); // remove all notes and scoring
|
||||||
|
m_Player[pn].FadeToFail(); // tell the NoteField to fade to white
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user