simplify
This commit is contained in:
+16
-20
@@ -221,19 +221,6 @@ void GameState::EndGame()
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
unsigned i;
|
|
||||||
for( i=0; i<g_vPlayedStageStats.size(); i++ )
|
|
||||||
{
|
|
||||||
const StageStats& ss = g_vPlayedStageStats[i];
|
|
||||||
CheckStageStats( ss, p );
|
|
||||||
CHECKPOINT;
|
|
||||||
|
|
||||||
pMachineProfile->m_iNumSongsPlayedByPlayMode[ss.playMode]++;
|
|
||||||
pMachineProfile->m_iNumSongsPlayedByStyle[ss.style]++;
|
|
||||||
pMachineProfile->m_iNumSongsPlayedByDifficulty[ss.pSteps[p]->GetDifficulty()]++;
|
|
||||||
int iMeter = clamp( ss.iMeter[p], 0, MAX_METER );
|
|
||||||
pMachineProfile->m_iNumSongsPlayedByMeter[ iMeter ]++;
|
|
||||||
}
|
|
||||||
|
|
||||||
Profile* pPlayerProfile = PROFILEMAN->GetProfile( (PlayerNumber)p );
|
Profile* pPlayerProfile = PROFILEMAN->GetProfile( (PlayerNumber)p );
|
||||||
if( pPlayerProfile )
|
if( pPlayerProfile )
|
||||||
@@ -245,25 +232,34 @@ void GameState::EndGame()
|
|||||||
PREFSMAN->m_bComboContinuesBetweenSongs ?
|
PREFSMAN->m_bComboContinuesBetweenSongs ?
|
||||||
g_CurStageStats.iCurCombo[p] :
|
g_CurStageStats.iCurCombo[p] :
|
||||||
0;
|
0;
|
||||||
|
}
|
||||||
|
|
||||||
for( i=0; i<g_vPlayedStageStats.size(); i++ )
|
for( unsigned i=0; i<g_vPlayedStageStats.size(); i++ )
|
||||||
|
{
|
||||||
|
const StageStats& ss = g_vPlayedStageStats[i];
|
||||||
|
CheckStageStats( ss, p );
|
||||||
|
CHECKPOINT;
|
||||||
|
const int iMeter = clamp( ss.iMeter[p], 0, MAX_METER );
|
||||||
|
|
||||||
|
pMachineProfile->m_iNumSongsPlayedByPlayMode[ss.playMode]++;
|
||||||
|
pMachineProfile->m_iNumSongsPlayedByStyle[ss.style]++;
|
||||||
|
pMachineProfile->m_iNumSongsPlayedByDifficulty[ss.pSteps[p]->GetDifficulty()]++;
|
||||||
|
pMachineProfile->m_iNumSongsPlayedByMeter[iMeter]++;
|
||||||
|
|
||||||
|
if( pPlayerProfile )
|
||||||
{
|
{
|
||||||
const StageStats& ss = g_vPlayedStageStats[i];
|
|
||||||
CheckStageStats( ss, p );
|
|
||||||
CHECKPOINT;
|
|
||||||
|
|
||||||
pPlayerProfile->m_iNumSongsPlayedByPlayMode[ss.playMode]++;
|
pPlayerProfile->m_iNumSongsPlayedByPlayMode[ss.playMode]++;
|
||||||
pPlayerProfile->m_iNumSongsPlayedByStyle[ss.style]++;
|
pPlayerProfile->m_iNumSongsPlayedByStyle[ss.style]++;
|
||||||
pPlayerProfile->m_iNumSongsPlayedByDifficulty[ss.pSteps[p]->GetDifficulty()]++;
|
pPlayerProfile->m_iNumSongsPlayedByDifficulty[ss.pSteps[p]->GetDifficulty()]++;
|
||||||
int iMeter = clamp( ss.iMeter[p], 0, MAX_METER );
|
|
||||||
pPlayerProfile->m_iNumSongsPlayedByMeter[iMeter]++;
|
pPlayerProfile->m_iNumSongsPlayedByMeter[iMeter]++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
MEMCARDMAN->FlushAllDisks();
|
|
||||||
}
|
}
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
|
MEMCARDMAN->FlushAllDisks();
|
||||||
|
CHECKPOINT;
|
||||||
|
|
||||||
BOOKKEEPER->WriteToDisk();
|
BOOKKEEPER->WriteToDisk();
|
||||||
PROFILEMAN->SaveMachineProfile();
|
PROFILEMAN->SaveMachineProfile();
|
||||||
|
|||||||
Reference in New Issue
Block a user