ResetToDefaultPlayerOptions, ResetToDefaultSongOptions
This commit is contained in:
@@ -1259,6 +1259,13 @@ void GameState::GetDefaultSongOptions( SongOptions &so )
|
|||||||
so.FromString( CommonMetrics::DEFAULT_MODIFIERS );
|
so.FromString( CommonMetrics::DEFAULT_MODIFIERS );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GameState::ResetToDefaultSongOptions( ModsLevel l )
|
||||||
|
{
|
||||||
|
SongOptions so;
|
||||||
|
GetDefaultSongOptions( so );
|
||||||
|
m_SongOptions.Assign( l, so );
|
||||||
|
}
|
||||||
|
|
||||||
void GameState::ApplyPreferredModifiers( PlayerNumber pn, RString sModifiers )
|
void GameState::ApplyPreferredModifiers( PlayerNumber pn, RString sModifiers )
|
||||||
{
|
{
|
||||||
m_pPlayerState[pn]->m_PlayerOptions.FromString( ModsLevel_Preferred, sModifiers );
|
m_pPlayerState[pn]->m_PlayerOptions.FromString( ModsLevel_Preferred, sModifiers );
|
||||||
|
|||||||
@@ -224,6 +224,7 @@ public:
|
|||||||
|
|
||||||
void GetDefaultPlayerOptions( PlayerOptions &po );
|
void GetDefaultPlayerOptions( PlayerOptions &po );
|
||||||
void GetDefaultSongOptions( SongOptions &so );
|
void GetDefaultSongOptions( SongOptions &so );
|
||||||
|
void ResetToDefaultSongOptions( ModsLevel l );
|
||||||
void ApplyPreferredModifiers( PlayerNumber pn, RString sModifiers );
|
void ApplyPreferredModifiers( PlayerNumber pn, RString sModifiers );
|
||||||
void ApplyStageModifiers( PlayerNumber pn, RString sModifiers );
|
void ApplyStageModifiers( PlayerNumber pn, RString sModifiers );
|
||||||
void ResetOptions();
|
void ResetOptions();
|
||||||
|
|||||||
@@ -89,6 +89,13 @@ void PlayerState::Update( float fDelta )
|
|||||||
m_fSecondsUntilAttacksPhasedOut = max( 0, m_fSecondsUntilAttacksPhasedOut - fDelta );
|
m_fSecondsUntilAttacksPhasedOut = max( 0, m_fSecondsUntilAttacksPhasedOut - fDelta );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PlayerState::ResetToDefaultPlayerOptions( ModsLevel l )
|
||||||
|
{
|
||||||
|
PlayerOptions po;
|
||||||
|
GAMESTATE->GetDefaultPlayerOptions( po );
|
||||||
|
m_PlayerOptions.Assign( l, po );
|
||||||
|
}
|
||||||
|
|
||||||
/* This is called to launch an attack, or to queue an attack if a.fStartSecond
|
/* This is called to launch an attack, or to queue an attack if a.fStartSecond
|
||||||
* is set. This is also called by GameState::Update when activating a queued attack. */
|
* is set. This is also called by GameState::Update when activating a queued attack. */
|
||||||
void PlayerState::LaunchAttack( const Attack& a )
|
void PlayerState::LaunchAttack( const Attack& a )
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ public:
|
|||||||
MultiPlayer m_mp;
|
MultiPlayer m_mp;
|
||||||
|
|
||||||
|
|
||||||
|
void ResetToDefaultPlayerOptions( ModsLevel l );
|
||||||
ModsGroup<PlayerOptions> m_PlayerOptions;
|
ModsGroup<PlayerOptions> m_PlayerOptions;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -76,9 +76,7 @@ void ScreenPlayerOptions::Input( const InputEventPlus &input )
|
|||||||
if( GAMESTATE->IsHumanPlayer(pn) && CodeDetector::EnteredCode(input.GameI.controller,CODE_CANCEL_ALL_PLAYER_OPTIONS) )
|
if( GAMESTATE->IsHumanPlayer(pn) && CodeDetector::EnteredCode(input.GameI.controller,CODE_CANCEL_ALL_PLAYER_OPTIONS) )
|
||||||
{
|
{
|
||||||
// apply the game default mods, but not the Profile saved mods
|
// apply the game default mods, but not the Profile saved mods
|
||||||
PlayerOptions po;
|
GAMESTATE->m_pPlayerState[pn]->ResetToDefaultPlayerOptions( ModsLevel_Preferred );
|
||||||
GAMESTATE->GetDefaultPlayerOptions( po );
|
|
||||||
GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.Assign( ModsLevel_Preferred, po );
|
|
||||||
|
|
||||||
MESSAGEMAN->Broadcast( ssprintf("CancelAllP%i", pn+1) );
|
MESSAGEMAN->Broadcast( ssprintf("CancelAllP%i", pn+1) );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user