From 90d8270cd65f6e4d3e5ec78025b4a6980c5c191b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 5 Sep 2004 02:47:30 +0000 Subject: [PATCH] fix extra stage music wheel entry not in a section when it should be --- stepmania/src/MusicWheel.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index ff8bf0f787..1f132fedde 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -395,6 +395,19 @@ void MusicWheel::GetSongList(vector &arraySongs, SortOrder so, CString sP if( !arraySteps.empty() ) arraySongs.push_back( pSong ); } + + /* Hack: Add extra stage item if it was eliminated for any reason (eg. it's a long + * song). */ + { + Song* pSong; + Steps* pSteps; + PlayerOptions po; + SongOptions so; + SONGMAN->GetExtraStageInfo( GAMESTATE->IsExtraStage2(), GAMESTATE->GetCurrentStyle(), pSong, pSteps, po, so ); + + if( find( arraySongs.begin(), arraySongs.end(), pSong ) == arraySongs.end() ) + arraySongs.push_back( pSong ); + } } @@ -592,7 +605,6 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelItemDatas } } - // HACK: Add extra stage item if it isn't already present on the music wheel if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) { Song* pSong; @@ -601,21 +613,15 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelItemDatas SongOptions so; SONGMAN->GetExtraStageInfo( GAMESTATE->IsExtraStage2(), GAMESTATE->GetCurrentStyle(), pSong, pSteps, po, so ); - bool bFoundExtraSong = false; - for( unsigned i=0; i