diff --git a/stepmania/src/PercentageDisplay.cpp b/stepmania/src/PercentageDisplay.cpp index 8c4f788d7b..2dd6ecbb0e 100644 --- a/stepmania/src/PercentageDisplay.cpp +++ b/stepmania/src/PercentageDisplay.cpp @@ -76,9 +76,14 @@ void PercentageDisplay::Refresh() int iPercentRemainder = int( (fPercentDancePoints*100 - int(fPercentDancePoints*100)) * 10 ); sNumToDisplay = ssprintf( "%02d", iPercentWhole ); m_textPercentRemainder.SetText( ssprintf(".%01d%%", iPercentRemainder) ); - } else { - float fNumToDisplay = max( 0, fPercentDancePoints*100 ); + } + else + { + float fNumToDisplay = fPercentDancePoints*100; sNumToDisplay = ssprintf( "%0*.*f%%", PERCENT_TOTAL_SIZE, PERCENT_DECIMAL_PLACES, fNumToDisplay ); + + // HACK: Use the last frame in the numbers texture as '-' + sNumToDisplay.Replace('-','x'); } } else diff --git a/stepmania/src/ScoreKeeperMAX2.cpp b/stepmania/src/ScoreKeeperMAX2.cpp index f5b781478c..f596c3d20b 100644 --- a/stepmania/src/ScoreKeeperMAX2.cpp +++ b/stepmania/src/ScoreKeeperMAX2.cpp @@ -209,6 +209,9 @@ static int GetScore(int p, int B, int S, int n) void ScoreKeeperMAX2::AddScore( TapNoteScore score ) { + if( g_CurStageStats.bFailed[m_PlayerNumber] ) + return; // don't add + int &iScore = g_CurStageStats.iScore[m_PlayerNumber]; /* http://www.aaroninjapan.com/ddr2.html @@ -318,6 +321,9 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score ) void ScoreKeeperMAX2::HandleTapScore( TapNoteScore score ) { + if( g_CurStageStats.bFailed[m_PlayerNumber] ) + return; // don't add + if( score == TNS_HIT_MINE ) { g_CurStageStats.iActualDancePoints[m_PlayerNumber] += TapNoteScoreToDancePoints( TNS_HIT_MINE ); @@ -327,6 +333,9 @@ void ScoreKeeperMAX2::HandleTapScore( TapNoteScore score ) void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow ) { + if( g_CurStageStats.bFailed[m_PlayerNumber] ) + return; // don't add + ASSERT( iNumTapsInRow >= 1 ); // Update dance points. @@ -402,6 +411,9 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa void ScoreKeeperMAX2::HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore ) { + if( g_CurStageStats.bFailed[m_PlayerNumber] ) + return; // don't add + // update dance points totals g_CurStageStats.iHoldNoteScores[m_PlayerNumber][holdScore] ++; g_CurStageStats.iActualDancePoints[m_PlayerNumber] += HoldNoteScoreToDancePoints( holdScore ); diff --git a/stepmania/src/StageStats.cpp b/stepmania/src/StageStats.cpp index bdbc82f1ea..137b3a49be 100644 --- a/stepmania/src/StageStats.cpp +++ b/stepmania/src/StageStats.cpp @@ -256,8 +256,11 @@ float StageStats::GetPercentDancePoints( PlayerNumber pn ) const if( iActualDancePoints[pn] == iPossibleDancePoints[pn] ) return 1; // correct for rounding error + ASSERT( iActualDancePoints[pn] <= iPossibleDancePoints[pn] ); + float fPercentDancePoints = iActualDancePoints[pn] / (float)iPossibleDancePoints[pn]; - return clamp( fPercentDancePoints, 0, 1 ); + + return fPercentDancePoints; } void StageStats::SetLifeRecord( PlayerNumber pn, float life, float pos )