From bc31b9ec6506be1086a605c30ead117e09807740 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 22 Sep 2003 22:11:18 +0000 Subject: [PATCH] Fix Perfects having a base score of 10 instead of 9 when Marvelous is always on (not set to "course only"). Fix OK being worth 3 DP instead of 2 DP when Marvelous is set to "course only" and we're not playing a course. Add an assert. Remove old code. --- stepmania/src/ScoreKeeperMAX2.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/stepmania/src/ScoreKeeperMAX2.cpp b/stepmania/src/ScoreKeeperMAX2.cpp index 5f0cc98546..c6f7623f70 100644 --- a/stepmania/src/ScoreKeeperMAX2.cpp +++ b/stepmania/src/ScoreKeeperMAX2.cpp @@ -211,12 +211,11 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score ) */ int p = 0; // score multiplier - const bool MarvelousEnabled = GAMESTATE->IsCourseMode() && (PREFSMAN->m_iMarvelousTiming > 0); switch( score ) { case TNS_MARVELOUS: p = 10; break; - case TNS_PERFECT: p = MarvelousEnabled? 9:10; break; + case TNS_PERFECT: p = GAMESTATE->ShowMarvelous()? 9:10; break; case TNS_GREAT: p = 5; break; default: p = 0; break; } @@ -227,9 +226,6 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score ) const int sum = (N * (N + 1)) / 2; const int B = m_iMaxPossiblePoints/10; - int iScoreMultiplier = (m_iMaxPossiblePoints / (10*sum)); - ASSERT( iScoreMultiplier >= 0 ); - // What does this do? "Don't use a multiplier if // the player has failed"? if( GAMESTATE->m_CurStageStats.bFailedEarlier[m_PlayerNumber] ) @@ -264,6 +260,8 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score ) } } + ASSERT( iScore >= 0 ); + /* Undo rounding from the last tap, and re-round. */ iScore += m_iScoreRemainder; m_iScoreRemainder = (iScore % m_iRoundTo); @@ -509,7 +507,7 @@ int ScoreKeeperMAX2::HoldNoteScoreToDancePoints( HoldNoteScore hns ) case PLAY_MODE_ONI: switch( hns ) { - case HNS_OK: return (PREFSMAN->m_iMarvelousTiming != 0)? +3:+2; + case HNS_OK: return GAMESTATE->ShowMarvelous()? +3:+2; case HNS_NG: return +0; } break;