From b376a8ae5136bad6a438d0cae203624a3c24de1d Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 5 Feb 2003 20:50:12 +0000 Subject: [PATCH] fix courses stopping after one song let the screen fade back in before starting the new song --- stepmania/src/ScreenGameplay.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 127b82ef55..1aa6549f8b 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -504,7 +504,14 @@ bool ScreenGameplay::IsLastSong() CStringArray asModifiers; pCourse->GetSongAndNotesForCurrentStyle( apSongs, apNotes, asModifiers, true ); - return unsigned(GAMESTATE->m_CurStageStats.iSongsPassed) >= apSongs.size(); // there are no more songs left + /* XXX: Should we really be using iSongsPassed to figure out what song we're + * on? Wouldn't m_iCurrentStageIndex be better for that? -glenn */ + int iPlaySongIndex = 0; + for( int p=0; pIsPlayerEnabled(p) ) + iPlaySongIndex = max( iPlaySongIndex, GAMESTATE->m_CurStageStats.iSongsPassed[p] ); + + return unsigned(iPlaySongIndex) >= apSongs.size(); // there are no more songs left } break; default: @@ -1265,7 +1272,9 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) case SM_BeginLoadingNextSong: LoadNextSong(); - StartPlayingSong( 0, 0 ); + /* We're fading in, so don't hit any notes for a few seconds; they'll be + * obscured by the fade. */ + StartPlayingSong( 3, 0 ); m_OniFade.OpenWipingRight( SM_None ); break;