Explicitly make sure FinishStage is called. We need to do this before
ResetGame, since it should be called before prompting to remove memory cards.
This commit is contained in:
@@ -594,6 +594,14 @@ static int GetNumStagesForCurrentSong()
|
||||
/* Called by ScreenGameplay. Set the length of the current song. */
|
||||
void GameState::BeginStage()
|
||||
{
|
||||
/* This should only be called once per stage. */
|
||||
if( m_iNumStagesOfThisSong != 0 )
|
||||
LOG->Warn( "XXX: m_iNumStagesOfThisSong == %i?", m_iNumStagesOfThisSong );
|
||||
|
||||
/* Finish the last stage (if any), if we havn't already. (For example, we might
|
||||
* have, for some reason, gone from gameplay to evaluation straight back to gameplay.) */
|
||||
FinishStage();
|
||||
|
||||
m_iNumStagesOfThisSong = GetNumStagesForCurrentSong();
|
||||
ASSERT( m_iNumStagesOfThisSong != -1 );
|
||||
}
|
||||
|
||||
@@ -169,6 +169,9 @@ static const CreditLine CREDIT_LINES[] =
|
||||
|
||||
ScreenCredits::ScreenCredits( CString sName ) : ScreenAttract( sName )
|
||||
{
|
||||
/* Make sure the last stage was finished. */
|
||||
GAMESTATE->FinishStage();
|
||||
|
||||
vector<Song*> arraySongs;
|
||||
SONGMAN->GetSongs( arraySongs );
|
||||
SongUtil::SortSongPointerArrayByTitle( arraySongs );
|
||||
|
||||
@@ -66,6 +66,9 @@ CString GetStatsLineValue( PlayerNumber pn, int iLine )
|
||||
|
||||
ScreenEnding::ScreenEnding( CString sClassName ) : ScreenAttract( sClassName, false/*dont reset GAMESTATE*/ )
|
||||
{
|
||||
/* Make sure the last stage was finished. */
|
||||
GAMESTATE->FinishStage();
|
||||
|
||||
vector<Song*> arraySongs;
|
||||
SONGMAN->GetSongs( arraySongs );
|
||||
SongUtil::SortSongPointerArrayByTitle( arraySongs );
|
||||
|
||||
@@ -35,6 +35,9 @@ const unsigned NUM_CREDIT_LINES = sizeof(CREDIT_LINES) / sizeof(CString);
|
||||
|
||||
ScreenMusicScroll::ScreenMusicScroll( CString sClassName ) : ScreenAttract( sClassName )
|
||||
{
|
||||
/* Make sure the last stage was finished. */
|
||||
GAMESTATE->FinishStage();
|
||||
|
||||
vector<Song*> arraySongs;
|
||||
SONGMAN->GetSongs( arraySongs );
|
||||
SongUtil::SortSongPointerArrayByTitle( arraySongs );
|
||||
|
||||
Reference in New Issue
Block a user