Add step totals in GameState::FinishStage, instead of eval. This means

that step counts and "calories" still count if you fail (or give up).
This commit is contained in:
Glenn Maynard
2004-05-24 01:32:17 +00:00
parent df56b72b33
commit d2bb74c409
2 changed files with 15 additions and 14 deletions
+15
View File
@@ -628,6 +628,21 @@ void GameState::FinishStage()
m_iCurrentStageIndex += m_iNumStagesOfThisSong;
m_iNumStagesOfThisSong = 0;
//
// Add step totals. Use fRadarActual, since the player might have failed partway
// through the song, in which case we don't want to give credit for the rest of the
// song.
//
FOREACH_HumanPlayer( pn )
{
int iNumTapsAndHolds = (int) g_CurStageStats.fRadarActual[pn][RADAR_NUM_TAPS_AND_HOLDS];
int iNumJumps = (int) g_CurStageStats.fRadarActual[pn][RADAR_NUM_JUMPS];
int iNumHolds = (int) g_CurStageStats.fRadarActual[pn][RADAR_NUM_HOLDS];
int iNumMines = (int) g_CurStageStats.fRadarActual[pn][RADAR_NUM_MINES];
int iNumHands = (int) g_CurStageStats.fRadarActual[pn][RADAR_NUM_HANDS];
PROFILEMAN->AddStepTotals( pn, iNumTapsAndHolds, iNumJumps, iNumHolds, iNumMines, iNumHands );
}
}
int GameState::GetStageIndex() const
-14
View File
@@ -884,20 +884,6 @@ void ScreenEvaluation::CommitScores(
Song* pSong = GAMESTATE->m_pCurSong;
Steps* pSteps = GAMESTATE->m_pCurNotes[p];
//
// Add step totals. (In Summary evaluations, we've already done this.)
//
if( m_Type != summary )
{
int iNumTapsAndHolds = (int) stageStats.fRadarPossible[p][RADAR_NUM_TAPS_AND_HOLDS];
int iNumJumps = (int) stageStats.fRadarPossible[p][RADAR_NUM_JUMPS];
int iNumHolds = (int) stageStats.fRadarPossible[p][RADAR_NUM_HOLDS];
int iNumMines = (int) stageStats.fRadarPossible[p][RADAR_NUM_MINES];
int iNumHands = (int) stageStats.fRadarPossible[p][RADAR_NUM_HANDS];
PROFILEMAN->AddStepTotals( p, iNumTapsAndHolds, iNumJumps, iNumHolds, iNumMines, iNumHands );
}
// whether or not to save scores when the stage was failed
// depends on if this is a course or not ... it's handled
// below in the switch