skip exporting round data when nothing was played (no taps, no holds)
This commit is contained in:
@@ -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; }
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user