fix "unlocking a song doesn't automatically select it"
This commit is contained in:
@@ -142,9 +142,11 @@ void GameState::Reset()
|
||||
m_iRoundSeed = rand();
|
||||
|
||||
m_pCurSong = NULL;
|
||||
m_pPreferredSong = NULL;
|
||||
FOREACH_PlayerNumber( p )
|
||||
m_pCurSteps[p] = NULL;
|
||||
m_pCurCourse = NULL;
|
||||
m_pPreferredCourse = NULL;
|
||||
FOREACH_PlayerNumber( p )
|
||||
m_pCurTrail[p] = NULL;
|
||||
|
||||
@@ -270,11 +272,11 @@ void GameState::PlayersFinalized()
|
||||
if( m_SortOrder == SORT_INVALID && pProfile->m_SortOrder != SORT_INVALID )
|
||||
m_SortOrder = pProfile->m_SortOrder;
|
||||
if( pProfile->m_LastDifficulty != DIFFICULTY_INVALID )
|
||||
GAMESTATE->m_PreferredDifficulty[pn] = pProfile->m_LastDifficulty;
|
||||
m_PreferredDifficulty[pn] = pProfile->m_LastDifficulty;
|
||||
if( pProfile->m_LastCourseDifficulty != COURSE_DIFFICULTY_INVALID )
|
||||
GAMESTATE->m_PreferredCourseDifficulty[pn] = pProfile->m_LastCourseDifficulty;
|
||||
if( m_pCurSong == NULL && pProfile->m_pLastSong )
|
||||
m_pCurSong = pProfile->m_pLastSong;
|
||||
m_PreferredCourseDifficulty[pn] = pProfile->m_LastCourseDifficulty;
|
||||
if( m_pPreferredSong == NULL && pProfile->m_pLastSong )
|
||||
m_pPreferredSong = pProfile->m_pLastSong;
|
||||
}
|
||||
|
||||
FOREACH_PlayerNumber( pn )
|
||||
@@ -374,10 +376,6 @@ void GameState::EndGame()
|
||||
|
||||
Profile* pProfile = PROFILEMAN->GetProfile(pn);
|
||||
|
||||
// persist settings
|
||||
if( !g_vPlayedStageStats.empty() )
|
||||
pProfile->m_pLastSong = g_vPlayedStageStats.back().pSong;
|
||||
|
||||
PROFILEMAN->SaveProfile( pn );
|
||||
PROFILEMAN->UnloadProfile( pn );
|
||||
}
|
||||
@@ -405,6 +403,10 @@ void GameState::SaveCurrentSettingsToProfile( PlayerNumber pn )
|
||||
pProfile->m_LastDifficulty = m_PreferredDifficulty[pn];
|
||||
if( m_PreferredCourseDifficulty[pn] != COURSE_DIFFICULTY_INVALID )
|
||||
pProfile->m_LastCourseDifficulty = m_PreferredCourseDifficulty[pn];
|
||||
if( m_pPreferredSong )
|
||||
pProfile->m_pLastSong = m_pPreferredSong;
|
||||
if( m_pPreferredCourse )
|
||||
pProfile->m_pLastCourse = m_pPreferredCourse;
|
||||
}
|
||||
|
||||
void GameState::Update( float fDelta )
|
||||
|
||||
Reference in New Issue
Block a user