fix aborted attacks continue to show in the active attack list

This commit is contained in:
Chris Danford
2005-04-15 13:00:30 +00:00
parent 7578fed39a
commit 812943886b
3 changed files with 8 additions and 1 deletions
+6
View File
@@ -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 )
+1
View File
@@ -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;
+1 -1
View File
@@ -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 );
}
}