From df63bf2642d73b592ee526d9facd7de7aed037c1 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 13 Mar 2004 12:27:24 +0000 Subject: [PATCH] fix Game default modifiers override Profile default modifiers depending on when the player joined --- stepmania/src/GameState.cpp | 17 +++++++++++++++++ stepmania/src/ProfileManager.cpp | 7 ------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index c52cc36a16..b9f907243c 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -193,6 +193,23 @@ void GameState::PlayersFinalized() { MEMCARDMAN->LockCards( true ); SONGMAN->LoadAllFromProfiles(); + + + // apply saved default modifiers if any + FOREACH_HumanPlayer( pn ) + { + if( PROFILEMAN->IsUsingProfile(pn) ) + { + Profile* pProfile = PROFILEMAN->GetProfile(pn); + if( pProfile->m_bUsingProfileDefaultModifiers ) + { + GAMESTATE->m_PlayerOptions[pn].Init(); + GAMESTATE->ApplyModifiers( pn, pProfile->m_sDefaultModifiers ); + } + } + } + + } /* This data is added to each player profile, and to the machine profile per-player. */ diff --git a/stepmania/src/ProfileManager.cpp b/stepmania/src/ProfileManager.cpp index b373157bc6..7f0f52e526 100644 --- a/stepmania/src/ProfileManager.cpp +++ b/stepmania/src/ProfileManager.cpp @@ -109,13 +109,6 @@ bool ProfileManager::LoadProfile( PlayerNumber pn, CString sProfileDir, bool bIs return false; } - // apply saved default modifiers if any - if( m_Profile[pn].m_bUsingProfileDefaultModifiers ) - { - GAMESTATE->m_PlayerOptions[pn].Init(); - GAMESTATE->ApplyModifiers( pn, m_Profile[pn].m_sDefaultModifiers ); - } - return true; }