fix Game default modifiers override Profile default modifiers depending on when the player joined
This commit is contained in:
@@ -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. */
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user