simplify TapAttack storage:

store attack info in TapNote
  in the SMNoteData string, store the attack params inline (like with keysounds)
play keysounds when hit
  still doesn't play keysounds on a miss
  still doesn't play autoKeysounds
This commit is contained in:
Chris Danford
2004-10-23 23:41:49 +00:00
parent 056b85f83e
commit 3ac1dba044
23 changed files with 395 additions and 499 deletions
+7 -5
View File
@@ -1207,18 +1207,20 @@ void GameState::SetNoteSkinForBeatRange( PlayerNumber pn, CString sNoteSkin, flo
/* This is called to launch an attack, or to queue an attack if a.fStartSecond
* is set. This is also called by GameState::Update when activating a queued attack. */
void GameState::LaunchAttack( PlayerNumber target, Attack a )
void GameState::LaunchAttack( PlayerNumber target, const Attack& a )
{
LOG->Trace( "Launch attack '%s' against P%d at %f", a.sModifier.c_str(), target+1, a.fStartSecond );
Attack attack = a;
/* If fStartSecond is -1, it means "launch as soon as possible". For m_ActiveAttacks,
* mark the real time it's starting (now), so Update() can know when the attack started
* so it can be removed later. For m_ModsToApply, leave the -1 in, so Player::Update
* knows to apply attack transforms correctly. (yuck) */
m_ModsToApply[target].push_back( a );
if( a.fStartSecond == -1 )
a.fStartSecond = this->m_fMusicSeconds;
m_ActiveAttacks[target].push_back( a );
m_ModsToApply[target].push_back( attack );
if( attack.fStartSecond == -1 )
attack.fStartSecond = this->m_fMusicSeconds;
m_ActiveAttacks[target].push_back( attack );
this->RebuildPlayerOptionsFromActiveAttacks( target );
}