From 850f5913518f1a40fa3f7c9a862f0659f37848b8 Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Thu, 24 Jul 2003 09:25:25 +0000 Subject: [PATCH] scoring fix - still need to check for fail for scoring purposes on fail_end_of_song and fail_off --- stepmania/src/ScreenGameplay.cpp | 15 ++++++++++++++- stepmania/src/StageStats.cpp | 4 +++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 42c2ed1373..001a1cbce7 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -1033,7 +1033,10 @@ void ScreenGameplay::Update( float fDeltaTime ) { if( (m_pLifeMeter[pn] && m_pLifeMeter[pn]->IsFailing() && !GAMESTATE->m_CurStageStats.bFailed[pn]) || (m_pCombinedLifeMeter && m_pCombinedLifeMeter->IsFailing((PlayerNumber)pn) && !GAMESTATE->m_CurStageStats.bFailed[pn]) ) + { + LOG->Trace("Player %d failed", (int)pn); GAMESTATE->m_CurStageStats.bFailed[pn] = true; // fail + } } break; @@ -1068,7 +1071,17 @@ void ScreenGameplay::Update( float fDeltaTime ) break; case SongOptions::FAIL_END_OF_SONG: case SongOptions::FAIL_OFF: - break; // don't check for fail + // we still need to check for fail for scoring purposes + for ( pn=0; pnIsFailing() && !GAMESTATE->m_CurStageStats.bFailed[pn]) || + (m_pCombinedLifeMeter && m_pCombinedLifeMeter->IsFailing((PlayerNumber)pn) && !GAMESTATE->m_CurStageStats.bFailed[pn]) ) + { + LOG->Trace("Player %d failed", (int)pn); + GAMESTATE->m_CurStageStats.bFailed[pn] = true; // fail + } + } + break; default: ASSERT(0); } diff --git a/stepmania/src/StageStats.cpp b/stepmania/src/StageStats.cpp index 7461faaf96..d235228ae0 100644 --- a/stepmania/src/StageStats.cpp +++ b/stepmania/src/StageStats.cpp @@ -56,7 +56,9 @@ Grade StageStats::GetGrade( PlayerNumber pn ) { ASSERT( GAMESTATE->IsPlayerEnabled(pn) ); // should be calling this is player isn't joined! - if( bFailed[pn] || !iPossibleDancePoints[pn] ) + // HACK: if dance points is less than 0, chances are they failed. + // I'm not sure if arcade does the same. + if( bFailed[pn] || iPossibleDancePoints[pn] <= 0 ) return GRADE_E; /* Based on the percentage of your total "Dance Points" to the maximum