diff --git a/stepmania/src/ActiveAttackList.h b/stepmania/src/ActiveAttackList.h index 447a01ed06..20711abbd6 100644 --- a/stepmania/src/ActiveAttackList.h +++ b/stepmania/src/ActiveAttackList.h @@ -14,9 +14,9 @@ public: virtual void Update( float fDelta ); -protected: void Refresh(); +protected: PlayerNumber m_PlayerNumber; }; diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 721eab6c6d..5cdd5c0fdc 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -1192,7 +1192,7 @@ void GameState::RemoveActiveAttacksForPlayer( PlayerNumber pn, AttackLevel al ) m_ActiveAttacks[pn].erase( m_ActiveAttacks[pn].begin()+s, m_ActiveAttacks[pn].begin()+s+1 ); --s; } - RebuildPlayerOptionsFromActiveAttacks( (PlayerNumber)pn ); + RebuildPlayerOptionsFromActiveAttacks( pn ); } void GameState::RemoveAllInventory() diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 3b63e558a8..16d3549ed2 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -849,8 +849,10 @@ void ScreenGameplay::LoadNextSong() GAMESTATE->m_pCurSong = m_apSongsQueue[iPlaySongIndex]; g_CurStageStats.pSong = GAMESTATE->m_pCurSong; + // No need to do this here. We do it in SongFinished(). + //GAMESTATE->RemoveAllActiveAttacks(); + // Restore the player's originally selected options. - GAMESTATE->RemoveAllActiveAttacks(); GAMESTATE->RestoreSelectedOptions(); m_textSongOptions.SetText( GAMESTATE->m_SongOptions.GetString() ); @@ -1912,6 +1914,8 @@ void ScreenGameplay::SongFinished() /* Extremely important: if we don't remove attacks before moving on to the next * screen, they'll still be turned on eventually. */ GAMESTATE->RemoveAllActiveAttacks(); + FOREACH_EnabledPlayer( p ) + m_ActiveAttackList[p].Refresh(); } void ScreenGameplay::StageFinished( bool bBackedOut ) @@ -2049,6 +2053,8 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) m_DancingState = STATE_OUTRO; GAMESTATE->RemoveAllActiveAttacks(); + FOREACH_EnabledPlayer( p ) + m_ActiveAttackList[p].Refresh(); LIGHTSMAN->SetLightsMode( LIGHTSMODE_ALL_CLEARED );