show per-difficulty awards on the eval screen even if not using a profile
This commit is contained in:
@@ -1045,12 +1045,6 @@ void ScreenEvaluation::CommitScores(
|
|||||||
{
|
{
|
||||||
FOREACH_HumanPlayer( p )
|
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];
|
deque<PerDifficultyAward> &vPdas = GAMESTATE->m_vLastPerDifficultyAwards[p];
|
||||||
|
|
||||||
LOG->Trace( "per difficulty awards" );
|
LOG->Trace( "per difficulty awards" );
|
||||||
@@ -1117,37 +1111,51 @@ void ScreenEvaluation::CommitScores(
|
|||||||
|
|
||||||
LOG->Trace( "done with per combo awards" );
|
LOG->Trace( "done with per combo awards" );
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
// erase awards from the Last list that have been received so that we
|
// erase awards from the Last list that have been received so that we
|
||||||
// won't show them again.
|
// won't show them again.
|
||||||
switch( m_Type )
|
//
|
||||||
|
if( !PROFILEMAN->IsUsingProfile(p) )
|
||||||
{
|
{
|
||||||
case stage:
|
// don't show any awards on ScreenAward unless using a profile
|
||||||
for( int i=GAMESTATE->m_vLastPerDifficultyAwards[p].size()-1; i>=0; i-- )
|
GAMESTATE->m_vLastPerDifficultyAwards[p].clear();
|
||||||
{
|
GAMESTATE->m_vLastPeakComboAwards[p].clear();
|
||||||
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 );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
LOG->Trace( "done erasing dupe pdas" );
|
|
||||||
|
|
||||||
{
|
{
|
||||||
for( int i=GAMESTATE->m_vLastPeakComboAwards[p].size()-1; i>=0; i-- )
|
Profile* pProfile = PROFILEMAN->GetProfile(p);
|
||||||
{
|
|
||||||
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" );
|
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" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user