scoring fix - still need to check for fail for scoring purposes on fail_end_of_song and fail_off

This commit is contained in:
Andrew Wong
2003-07-24 09:25:25 +00:00
parent 150a150e9a
commit 850f591351
2 changed files with 17 additions and 2 deletions
+14 -1
View File
@@ -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; pn<NUM_PLAYERS; pn++ )
{
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;
default:
ASSERT(0);
}
+3 -1
View File
@@ -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