show per-difficulty awards on the eval screen even if not using a profile

This commit is contained in:
Chris Danford
2004-05-31 20:40:44 +00:00
parent 09aeac7551
commit ce4274af53
+39 -31
View File
@@ -1045,12 +1045,6 @@ void ScreenEvaluation::CommitScores(
{
FOREACH_HumanPlayer( p )
{
// must be using a profile to receive awards
if( !PROFILEMAN->IsUsingProfile(p) )
continue;
Profile* pProfile = PROFILEMAN->GetProfile(p);
deque<PerDifficultyAward> &vPdas = GAMESTATE->m_vLastPerDifficultyAwards[p];
LOG->Trace( "per difficulty awards" );
@@ -1117,37 +1111,51 @@ void ScreenEvaluation::CommitScores(
LOG->Trace( "done with per combo awards" );
//
// erase awards from the Last list that have been received so that we
// won't show them again.
switch( m_Type )
//
if( !PROFILEMAN->IsUsingProfile(p) )
{
case stage:
for( int i=GAMESTATE->m_vLastPerDifficultyAwards[p].size()-1; i>=0; i-- )
{
PerDifficultyAward pda = GAMESTATE->m_vLastPerDifficultyAwards[p][i];
Steps* pSteps = stageStats.pSteps[p];
ASSERT( pSteps != NULL );
bool bAlreadyHad = pProfile->HasPerDifficultyAward( pSteps->m_StepsType, pSteps->GetDifficulty(), pda );
pProfile->AddPerDifficultyAward( pSteps->m_StepsType, pSteps->GetDifficulty(), pda );
if( bAlreadyHad )
GAMESTATE->m_vLastPerDifficultyAwards[p].erase( GAMESTATE->m_vLastPerDifficultyAwards[p].begin()+i );
}
// don't show any awards on ScreenAward unless using a profile
GAMESTATE->m_vLastPerDifficultyAwards[p].clear();
GAMESTATE->m_vLastPeakComboAwards[p].clear();
}
LOG->Trace( "done erasing dupe pdas" );
else
{
for( int i=GAMESTATE->m_vLastPeakComboAwards[p].size()-1; i>=0; i-- )
{
PeakComboAward pca = GAMESTATE->m_vLastPeakComboAwards[p][i];
bool bAlreadyHad = pProfile->HasPeakComboAward( pca );
pProfile->AddPeakComboAward( pca );
if( bAlreadyHad )
GAMESTATE->m_vLastPeakComboAwards[p].erase( GAMESTATE->m_vLastPeakComboAwards[p].begin()+i );
}
}
Profile* pProfile = PROFILEMAN->GetProfile(p);
LOG->Trace( "done erasing pcas" );
switch( m_Type )
{
case stage:
for( int i=GAMESTATE->m_vLastPerDifficultyAwards[p].size()-1; i>=0; i-- )
{
PerDifficultyAward pda = GAMESTATE->m_vLastPerDifficultyAwards[p][i];
Steps* pSteps = stageStats.pSteps[p];
ASSERT( pSteps != NULL );
bool bAlreadyHad = pProfile->HasPerDifficultyAward( pSteps->m_StepsType, pSteps->GetDifficulty(), pda );
pProfile->AddPerDifficultyAward( pSteps->m_StepsType, pSteps->GetDifficulty(), pda );
if( bAlreadyHad )
GAMESTATE->m_vLastPerDifficultyAwards[p].erase( GAMESTATE->m_vLastPerDifficultyAwards[p].begin()+i );
}
}
LOG->Trace( "done erasing dupe pdas" );
{
for( int i=GAMESTATE->m_vLastPeakComboAwards[p].size()-1; i>=0; i-- )
{
PeakComboAward pca = GAMESTATE->m_vLastPeakComboAwards[p][i];
bool bAlreadyHad = pProfile->HasPeakComboAward( pca );
pProfile->AddPeakComboAward( pca );
if( bAlreadyHad )
GAMESTATE->m_vLastPeakComboAwards[p].erase( GAMESTATE->m_vLastPeakComboAwards[p].begin()+i );
}
}
LOG->Trace( "done erasing pcas" );
}
}
}