fix Game default modifiers override Profile default modifiers depending on when the player joined

This commit is contained in:
Chris Danford
2004-03-13 12:27:24 +00:00
parent ada21b9787
commit df63bf2642
2 changed files with 17 additions and 7 deletions
+17
View File
@@ -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. */
-7
View File
@@ -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;
}