Don't give awards if GaveUp or UsedAutoplay

Move bGaveUp into StageStats.  It's not really a per-player value.
This commit is contained in:
Chris Danford
2005-10-01 00:18:13 +00:00
parent bc6c7c89bc
commit fa2a5bddc3
8 changed files with 23 additions and 10 deletions
+6 -3
View File
@@ -24,7 +24,6 @@ void PlayerStageStats::Init()
fAliveSeconds = 0;
bFailed = false;
bFailedEarlier = false;
bGaveUp = false;
iPossibleDancePoints = iCurPossibleDancePoints = iActualDancePoints = 0;
iPossibleGradePoints = 0;
iCurCombo = iMaxCombo = iCurMissCombo = iScore = iBonus = iMaxScore = iCurMaxScore = 0;
@@ -59,7 +58,6 @@ void PlayerStageStats::AddStats( const PlayerStageStats& other )
fAliveSeconds += other.fAliveSeconds;
bFailed |= other.bFailed;
bFailedEarlier |= other.bFailedEarlier;
bGaveUp |= other.bGaveUp;
iPossibleDancePoints += other.iPossibleDancePoints;
iActualDancePoints += other.iActualDancePoints;
iCurPossibleDancePoints += other.iCurPossibleDancePoints;
@@ -511,10 +509,15 @@ float PlayerStageStats::GetPercentageOfTaps( TapNoteScore tns ) const
return iTapNoteScores[tns] / (float)iTotalTaps;
}
void PlayerStageStats::CalcAwards( PlayerNumber p )
void PlayerStageStats::CalcAwards( PlayerNumber p, bool bGaveUp, bool bUsedAutoplay )
{
LOG->Trace( "hand out awards" );
m_pcaToShow = PEAK_COMBO_AWARD_INVALID;
if( bGaveUp || bUsedAutoplay )
return;
deque<PerDifficultyAward> &vPdas = GAMESTATE->m_vLastPerDifficultyAwards[p];
LOG->Trace( "per difficulty awards" );