diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index dc667b558e..74ef978823 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -96,7 +96,9 @@ void GameState::Reset() for( s=0; s= 1 ); @@ -620,47 +619,29 @@ void Player::HandleNoteScore( TapNoteScore score, int iNumTapsInRow ) //Remember this is just the score for the step, not the cumulative score up to the 57th step. Also, please note that I am currently checking into rounding errors with the system and if there are any, how they are resolved in the system. // //Note: if you got all Perfect on this song, you would get (p=10)*B, which is 80,000,000. In fact, the maximum possible score for any song is the number of feet difficulty X 10,000,000. - - float& fScore = GAMESTATE->m_fScore[m_PlayerNumber]; - ASSERT( fScore >= 0 ); - - +//3dfsux: +//I redid this code so it will store the score as a long, then correct the score for each song based on that value. +// lScore == p * n +// m_fScoreMultiplier = (B/S) +// keeping these seperate for as long as possible improves accuracy. + long &lScore = GAMESTATE->m_lScore[m_PlayerNumber]; int p; // score multiplier + switch( score ) { case TNS_PERFECT: p = 10; break; case TNS_GREAT: p = 5; break; default: p = 0; break; } - + for( int i=0; iSetScore( fScore ); + lScore += p * ++m_iTapNotesHit; + ASSERT(lScore > 0); + if (m_pScore) + m_pScore->SetScore(GAMESTATE->m_fScore[m_PlayerNumber] = lScore * GAMESTATE->m_fScoreMultiplier); } + void Player::HandleNoteScore( HoldNoteScore score, TapNoteScore TapNoteScore ) { // don't accumulate points if AutoPlay is on.