diff --git a/stepmania/src/HighScore.cpp b/stepmania/src/HighScore.cpp index 2c4e822206..ec5cb04535 100644 --- a/stepmania/src/HighScore.cpp +++ b/stepmania/src/HighScore.cpp @@ -160,6 +160,21 @@ void HighScore::Unset() m_Impl = new HighScoreImpl; } +bool HighScore::IsEmpty() const +{ + FOREACH_ENUM( TapNoteScore, tns ) + { + if( m_Impl->iTapNoteScores[tns] > 0 ) + return false; + } + FOREACH_ENUM( HoldNoteScore, hns ) + { + if( m_Impl->iHoldNoteScores[hns] > 0 ) + return false; + } + return true; +} + RString HighScore::GetName() const { return m_Impl->sName; } Grade HighScore::GetGrade() const { return m_Impl->grade; } int HighScore::GetScore() const { return m_Impl->iScore; } diff --git a/stepmania/src/HighScore.h b/stepmania/src/HighScore.h index 0a5dc6dc76..b758bc6451 100644 --- a/stepmania/src/HighScore.h +++ b/stepmania/src/HighScore.h @@ -20,6 +20,7 @@ struct HighScore RString GetName() const; Grade GetGrade() const; int GetScore() const; + bool IsEmpty() const; float GetPercentDP() const; float GetSurviveSeconds() const; float GetSurvivalSeconds() const; diff --git a/stepmania/src/StatsManager.cpp b/stepmania/src/StatsManager.cpp index 5195e53e98..3e7937a9be 100644 --- a/stepmania/src/StatsManager.cpp +++ b/stepmania/src/StatsManager.cpp @@ -264,12 +264,20 @@ void StatsManager::CommitStatsToProfiles( const StageStats *pSS ) if(!GAMESTATE->m_bMultiplayer) { FOREACH_HumanPlayer( p ) + { + if( pSS->m_player[p].m_HighScore.IsEmpty() ) + continue; recent->AppendChild( MakeRecentScoreNode( *pSS, GAMESTATE->m_pCurTrail[p], pSS->m_player[p], MultiPlayer_Invalid ) ); + } } else { FOREACH_EnabledMultiPlayer( mp ) + { + if( pSS->m_multiPlayer[mp].m_HighScore.IsEmpty() ) + continue; recent->AppendChild( MakeRecentScoreNode( *pSS, GAMESTATE->m_pCurTrail[GAMESTATE->m_MasterPlayerNumber], pSS->m_multiPlayer[mp], mp ) ); + } } RString sDate = DateTime::GetNowDate().GetString();