If AutoSetStyle is on and Autogen is off, some songs with valid steps may be missing from the wheel. Re-add them by checking for every playable StepsType when AutoSetStyle is on.

fixes issue 147: http://ssc.ajworld.net/sm-ssc/bugtracker/view.php?id=147
This commit is contained in:
AJ Kelly
2010-06-03 12:52:02 -05:00
parent 0046422506
commit 3959410460
+27 -3
View File
@@ -380,9 +380,33 @@ void MusicWheel::GetSongList( vector<Song*> &arraySongs, SortOrder so )
}
else
{
// If the song has at least one steps, add it.
if( pSong->HasStepsType(GAMESTATE->GetCurrentStyle()->m_StepsType) )
arraySongs.push_back( pSong );
if(CommonMetrics::AUTO_SET_STYLE)
{
// with AUTO_SET_STYLE on and Autogen off, some songs may get
// hidden. Search through every playable StepsType until you
// find one, then add the song.
// see Issue 147 for more information. -aj
// http://ssc.ajworld.net/sm-ssc/bugtracker/view.php?id=147
set<StepsType> vStepsType;
SongUtil::GetPlayableStepsTypes( pSong, vStepsType );
bool bHasFoundStepsType = false;
FOREACHS( StepsType, vStepsType, st )
{
if(pSong->HasStepsType(*st) && !bHasFoundStepsType)
{
arraySongs.push_back( pSong );
bHasFoundStepsType = true;
continue;
}
}
}
else
{
// If the song has at least one steps, add it.
if( pSong->HasStepsType(GAMESTATE->GetCurrentStyle()->m_StepsType) )
arraySongs.push_back( pSong );
}
}
}