From 2b1d7b6093f3ff8d4f5a3c332cf636ddcec028d2 Mon Sep 17 00:00:00 2001 From: Angela Stefanski Date: Fri, 1 Nov 2002 03:13:30 +0000 Subject: [PATCH] Modified Update function to record m_fSecondsBeforeFail for a player failure in life bar mode (needed to award E grades for failure) --- stepmania/src/ScreenGameplay.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index e04d9c11c1..e8c0667027 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -674,6 +674,8 @@ hehe - Andy) void ScreenGameplay::Update( float fDeltaTime ) { + int pn; + //LOG->Trace( "ScreenGameplay::Update(%f)", fDeltaTime ); m_soundMusic.Update( fDeltaTime ); @@ -725,6 +727,14 @@ void ScreenGameplay::Update( float fDeltaTime ) if( AllAreFailing() ) SCREENMAN->SendMessageToTopScreen( SM_BeginFailed, 0 ); if( AllAreInDanger() ) m_Background.TurnDangerOn(); else m_Background.TurnDangerOff(); + + // check for individual fail + for ( pn=0; pnIsFailing() && GAMESTATE->m_fSecondsBeforeFail[pn] == -1) + GAMESTATE->m_fSecondsBeforeFail[pn] = GAMESTATE->GetElapsedSeconds(); + } + break; case SongOptions::LIFE_BATTERY: if( AllFailedEarlier() )SCREENMAN->SendMessageToTopScreen( SM_BeginFailed, 0 );