re-add applydefaultoptions
This commit is contained in:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user