diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index df8f953318..281c904575 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -358,14 +358,15 @@ void MusicWheel::GetSongList(vector &arraySongs, SongSortOrder so, CStrin /* If we're on an extra stage, and this song is selected, ignore #SELECTABLE. */ if( pSong != GAMESTATE->m_pCurSong || - (!GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2()) ) { + (!GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2()) ) + { /* Hide songs that asked to be hidden via #SELECTABLE. */ if( so!=SORT_ROULETTE && !pSong->NormallyDisplayed() ) continue; - /* Don't show in roulette if #SELECTABLE:NO unless some other song in the same - * roulette class has previously been unlocked. */ - if( so==SORT_ROULETTE && !(pSong->RouletteDisplayed() - || UNLOCKMAN->SongIsRoulette( pSong )) ) + if( so!=SORT_ROULETTE && UNLOCKMAN->SongIsRouletteOnly( pSong ) ) + continue; + /* Don't show in roulette if #SELECTABLE:NO. */ + if( so==SORT_ROULETTE && !pSong->RouletteDisplayed() ) continue; } diff --git a/stepmania/src/UnlockSystem.cpp b/stepmania/src/UnlockSystem.cpp index 95c4bba803..b08f1584b5 100644 --- a/stepmania/src/UnlockSystem.cpp +++ b/stepmania/src/UnlockSystem.cpp @@ -79,8 +79,8 @@ bool UnlockSystem::SongIsLocked( const Song *song ) const return p->IsLocked(); } -/* Return true if the song is available in roulette (overriding #SELECTABLE). */ -bool UnlockSystem::SongIsRoulette( const Song *song ) const +/* Return true if the song is *only* available in roulette. */ +bool UnlockSystem::SongIsRouletteOnly( const Song *song ) const { if( !PREFSMAN->m_bUseUnlockSystem ) return false; @@ -90,10 +90,10 @@ bool UnlockSystem::SongIsRoulette( const Song *song ) const return false; /* If the song is locked by a code, and it's a roulette code, honor IsLocked. */ - if( p->m_iCode != -1 && - m_RouletteCodes.find( p->m_iCode ) != m_RouletteCodes.end() ) - return p->IsLocked(); - return true; + if( p->m_iCode == -1 || m_RouletteCodes.find( p->m_iCode ) == m_RouletteCodes.end() ) + return false; + + return p->IsLocked(); } const UnlockEntry *UnlockSystem::FindLockEntry( CString songname ) const diff --git a/stepmania/src/UnlockSystem.h b/stepmania/src/UnlockSystem.h index 4efb819b93..3d2889ab36 100644 --- a/stepmania/src/UnlockSystem.h +++ b/stepmania/src/UnlockSystem.h @@ -66,7 +66,7 @@ public: // Used on select screens: bool SongIsLocked( const Song *song ) const; - bool SongIsRoulette( const Song *song ) const; + bool SongIsRouletteOnly( const Song *song ) const; bool CourseIsLocked( const Course *course ) const; // Gets number of unlocks for title screen