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;
|
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; }
|
RString HighScore::GetName() const { return m_Impl->sName; }
|
||||||
Grade HighScore::GetGrade() const { return m_Impl->grade; }
|
Grade HighScore::GetGrade() const { return m_Impl->grade; }
|
||||||
int HighScore::GetScore() const { return m_Impl->iScore; }
|
int HighScore::GetScore() const { return m_Impl->iScore; }
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ struct HighScore
|
|||||||
RString GetName() const;
|
RString GetName() const;
|
||||||
Grade GetGrade() const;
|
Grade GetGrade() const;
|
||||||
int GetScore() const;
|
int GetScore() const;
|
||||||
|
bool IsEmpty() const;
|
||||||
float GetPercentDP() const;
|
float GetPercentDP() const;
|
||||||
float GetSurviveSeconds() const;
|
float GetSurviveSeconds() const;
|
||||||
float GetSurvivalSeconds() const;
|
float GetSurvivalSeconds() const;
|
||||||
|
|||||||
@@ -264,12 +264,20 @@ void StatsManager::CommitStatsToProfiles( const StageStats *pSS )
|
|||||||
if(!GAMESTATE->m_bMultiplayer)
|
if(!GAMESTATE->m_bMultiplayer)
|
||||||
{
|
{
|
||||||
FOREACH_HumanPlayer( p )
|
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 ) );
|
recent->AppendChild( MakeRecentScoreNode( *pSS, GAMESTATE->m_pCurTrail[p], pSS->m_player[p], MultiPlayer_Invalid ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FOREACH_EnabledMultiPlayer( mp )
|
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 ) );
|
recent->AppendChild( MakeRecentScoreNode( *pSS, GAMESTATE->m_pCurTrail[GAMESTATE->m_MasterPlayerNumber], pSS->m_multiPlayer[mp], mp ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RString sDate = DateTime::GetNowDate().GetString();
|
RString sDate = DateTime::GetNowDate().GetString();
|
||||||
|
|||||||
Reference in New Issue
Block a user