From 792ae76f4c8c6cdb2d2d86225aff91575ce57c61 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 21 Jul 2005 01:56:49 +0000 Subject: [PATCH] edit state has its own PlayerState; reset attacks here --- stepmania/src/ScreenEdit.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 18df939a3e..83f081ad22 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -1786,9 +1786,6 @@ void ScreenEdit::TransitionEditState( EditState em ) * make sure we don't stay there if we escaped out early. */ GAMESTATE->m_fSongBeat = max( GAMESTATE->m_fSongBeat, 0 ); - /* Stop displaying course attacks, if any. */ - GAMESTATE->RemoveAllActiveAttacks(); - GAMESTATE->m_pPlayerState[PLAYER_1]->RebuildPlayerOptionsFromActiveAttacks(); GAMESTATE->m_pPlayerState[PLAYER_1]->m_CurrentPlayerOptions = GAMESTATE->m_pPlayerState[PLAYER_1]->m_PlayerOptions; if( old == STATE_RECORDING ) @@ -1817,6 +1814,12 @@ void ScreenEdit::TransitionEditState( EditState em ) { case STATE_PLAYING: case STATE_RECORDING: + /* Stop displaying course attacks, if any, and return to the player's defaults. */ + GAMESTATE->RemoveAllActiveAttacks(); + + /* Snap to current options. */ + GAMESTATE->m_pPlayerState[PLAYER_1]->RebuildPlayerOptionsFromActiveAttacks(); + /* Give a 1 secord lead-in. If we're loading Player, this must be done first. */ float fSeconds = m_pSong->m_Timing.GetElapsedTimeFromBeat( NoteRowToBeat(m_iStartPlayingAt) ) - 1; GAMESTATE->UpdateSongPosition( fSeconds, m_pSong->m_Timing );