diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index 9fb60ef958..21ab179a73 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -1213,6 +1213,12 @@ void GameState::RemoveActiveAttacksForPlayer( PlayerNumber pn, AttackLevel al ) RebuildPlayerOptionsFromActiveAttacks( pn ); } +void GameState::EndActiveAttacksForPlayer( PlayerNumber pn ) +{ + FOREACH( Attack, m_pPlayerState[pn]->m_ActiveAttacks, a ) + a->fSecsRemaining = 0; +} + void GameState::RemoveAllInventory() { FOREACH_PlayerNumber( p ) diff --git a/stepmania/src/GameState.h b/stepmania/src/GameState.h index d626c9a095..cc98e6fc91 100644 --- a/stepmania/src/GameState.h +++ b/stepmania/src/GameState.h @@ -192,6 +192,7 @@ public: void RebuildPlayerOptionsFromActiveAttacks( PlayerNumber pn ); void RemoveAllActiveAttacks(); // called on end of song void RemoveActiveAttacksForPlayer( PlayerNumber pn, AttackLevel al=NUM_ATTACK_LEVELS /*all*/ ); + void EndActiveAttacksForPlayer( PlayerNumber pn ); void RemoveAllInventory(); int GetSumOfActiveAttackLevels( PlayerNumber pn ) const; PlayerNumber GetBestPlayer() const; diff --git a/stepmania/src/ScoreKeeperRave.cpp b/stepmania/src/ScoreKeeperRave.cpp index 5177eef695..1f4d252faf 100644 --- a/stepmania/src/ScoreKeeperRave.cpp +++ b/stepmania/src/ScoreKeeperRave.cpp @@ -118,7 +118,7 @@ void ScoreKeeperRave::AddSuperMeterDelta( float fUnscaledPercentChange ) default: ASSERT(0); } if( !bWinning ) - GAMESTATE->RemoveActiveAttacksForPlayer( m_pPlayerState->m_PlayerNumber ); + GAMESTATE->EndActiveAttacksForPlayer( m_pPlayerState->m_PlayerNumber ); } }