From b9cb773195d54f6da03419f44371bc83b9b5eaef Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 20 Mar 2004 19:15:06 +0000 Subject: [PATCH] clean up attract sound counting --- stepmania/src/GameState.cpp | 24 +++++++++++------------- stepmania/src/GameState.h | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index ed6202503c..b02e60c91c 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -57,7 +57,7 @@ GameState::GameState() ReloadCharacters(); - m_iNumTimesThroughAttract = 0; + m_iNumTimesThroughAttract = -1; // initial screen will bump this up to 0 /* Don't reset yet; let the first screen do it, so we can * use PREFSMAN and THEME. */ @@ -174,7 +174,9 @@ void GameState::BeginGame() m_vpsNamesThatWereFilled.clear(); - m_iNumTimesThroughAttract = 0; + // play attract on the ending screen, then in one more whole attract + // sequence after the game is over (even if attract sounds are set to off) + m_iNumTimesThroughAttract = -2; } void CheckStageStats( const StageStats &ss, int p ) @@ -266,15 +268,11 @@ void GameState::EndGame() pMachineProfile->m_iCurrentCombo = 0; CHECKPOINT; - int p; - for( p=0; pGetProfile( (PlayerNumber)p ); + Profile* pPlayerProfile = PROFILEMAN->GetProfile( p ); if( pPlayerProfile ) { pPlayerProfile->m_iTotalPlaySeconds += iPlaySeconds; @@ -289,10 +287,10 @@ void GameState::EndGame() for( unsigned i=0; i