re-add applydefaultoptions

This commit is contained in:
Chris Danford
2005-11-30 04:27:10 +00:00
parent bc1b00e437
commit 557ae44dc7
2 changed files with 13 additions and 0 deletions
+12
View File
@@ -53,6 +53,7 @@ void GameCommand::Init()
m_bInsertCredit = false;
m_bStopMusic = false;
m_bApplyDefaultOptions = false;
}
class SongOptions;
@@ -357,6 +358,11 @@ void GameCommand::LoadOne( const Command& cmd )
m_bStopMusic = true;
}
else if( sName == "applydefaultoptions" )
{
m_bApplyDefaultOptions = true;
}
else
{
CString sWarning = ssprintf( "Command '%s' is not valid.", cmd.GetOriginalCommandString().c_str() );
@@ -722,6 +728,12 @@ void GameCommand::ApplySelf( const vector<PlayerNumber> &vpns ) const
{
InsertCredit();
}
if( m_bApplyDefaultOptions )
{
FOREACH_PlayerNumber( p )
GAMESTATE->GetDefaultPlayerOptions( GAMESTATE->m_pPlayerState[p]->m_PlayerOptions );
GAMESTATE->GetDefaultSongOptions( GAMESTATE->m_SongOptions );
}
// HACK: Set life type to BATTERY just once here so it happens once and
// we don't override the user's changes if they back out.
if( GAMESTATE->m_PlayMode == PLAY_MODE_ONI &&