move GetSumOfActiveAttackLevels into PlayerState

This commit is contained in:
Glenn Maynard
2005-07-07 21:24:59 +00:00
parent 4f417bcce2
commit c2176f01b2
3 changed files with 14 additions and 12 deletions
+11
View File
@@ -12,6 +12,17 @@ void PlayerState::Update( float fDelta )
m_CurrentPlayerOptions.Approach( m_PlayerOptions, fDelta );
}
int PlayerState::GetSumOfActiveAttackLevels() const
{
int iSum = 0;
for( unsigned s=0; s<m_ActiveAttacks.size(); s++ )
if( m_ActiveAttacks[s].fSecsRemaining > 0 && m_ActiveAttacks[s].level != NUM_ATTACK_LEVELS )
iSum += m_pPlayerState[pn]m_ActiveAttacks[s].level;
return iSum;
}
/*
* (c) 2001-2004 Chris Danford, Chris Gomez
* All rights reserved.