We have a lot of duplicate, redundant checks between UNLOCKMAN->SongIsLocked
and Song::GetDisplayed/Song::NormallyDisplayed, which leads to inconsistency. Make UnlockManager::SongIsLocked() handle both. Returns a bitfield; most cases only need to test true or false. (Also adds m_bEnabled; not used yet.)
This commit is contained in:
@@ -100,7 +100,7 @@ void CatalogXml::Save( LoadingWindow *loading_window )
|
||||
|
||||
if( pSong->IsTutorial() )
|
||||
continue; // skip: Tutorial song.
|
||||
if( UNLOCKMAN->SongIsLocked(pSong) )
|
||||
if( !pSong->NormallyDisplayed() )
|
||||
continue; // skip: Locked song.
|
||||
iTotalSongs++;
|
||||
iNumSongsInGroup++;
|
||||
@@ -184,7 +184,7 @@ void CatalogXml::Save( LoadingWindow *loading_window )
|
||||
|
||||
if( pSong->IsTutorial() )
|
||||
continue; // skip: Tutorial song.
|
||||
if( UNLOCKMAN->SongIsLocked(pSong) )
|
||||
if( !pSong->NormallyDisplayed() )
|
||||
continue; // skip: Locked song.
|
||||
|
||||
SongID songID;
|
||||
|
||||
Reference in New Issue
Block a user