fix both ScoreKeeperRave launch attack p1 and Player attack launch p2
being played when p1 launches an attack simplify battle/course attack sound handling; do it in the same place; make the sound filenames clear
This commit is contained in:
@@ -232,8 +232,20 @@ void PlayerMinus::Load( PlayerNumber pn, const NoteData* pNoteData, LifeMeter* p
|
||||
m_soundMine.SetParams( p );
|
||||
}
|
||||
|
||||
m_soundAttackLaunch.Load( THEME->GetPathToS(ssprintf("Player attack launch p%d",pn+1)), true );
|
||||
m_soundAttackEnding.Load( THEME->GetPathToS(ssprintf("Player attack ending p%d",pn+1)), true );
|
||||
/* Attacks can be launched in course modes and in battle modes. They both come
|
||||
* here to play, but allow loading a different sound for different modes. */
|
||||
switch( GAMESTATE->m_PlayMode )
|
||||
{
|
||||
case PLAY_MODE_RAVE:
|
||||
case PLAY_MODE_BATTLE:
|
||||
m_soundAttackLaunch.Load( THEME->GetPathToS(ssprintf("Player battle attack launch p%d",pn+1)), true );
|
||||
m_soundAttackEnding.Load( THEME->GetPathToS(ssprintf("Player battle attack ending p%d",pn+1)), true );
|
||||
break;
|
||||
default:
|
||||
m_soundAttackLaunch.Load( THEME->GetPathToS(ssprintf("Player course attack launch p%d",pn+1)), true );
|
||||
m_soundAttackEnding.Load( THEME->GetPathToS(ssprintf("Player course attack ending p%d",pn+1)), true );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void PlayerMinus::Update( float fDeltaTime )
|
||||
|
||||
@@ -24,9 +24,6 @@ CachedThemeMetricF ATTACK_DURATION_SECONDS ("ScoreKeeperRave","AttackDurationSec
|
||||
ScoreKeeperRave::ScoreKeeperRave(PlayerNumber pn) : ScoreKeeper(pn)
|
||||
{
|
||||
ATTACK_DURATION_SECONDS.Refresh();
|
||||
|
||||
m_soundLaunchAttack.Load( THEME->GetPathToS(ssprintf("ScoreKeeperRave launch attack p%d",pn+1)) );
|
||||
m_soundAttackEnding.Load( THEME->GetPathToS(ssprintf("ScoreKeeperRave attack end p%d",pn+1)) );
|
||||
}
|
||||
|
||||
void ScoreKeeperRave::OnNextSong( int iSongInCourseIndex, const Steps* pNotes, const NoteData* pNoteData )
|
||||
@@ -125,8 +122,6 @@ void ScoreKeeperRave::AddSuperMeterDelta( float fUnscaledPercentChange )
|
||||
|
||||
void ScoreKeeperRave::Update( float fDelta )
|
||||
{
|
||||
if( GAMESTATE->m_bAttackEndedThisUpdate[m_PlayerNumber] )
|
||||
m_soundAttackEnding.Play();
|
||||
}
|
||||
|
||||
void ScoreKeeperRave::LaunchAttack( AttackLevel al )
|
||||
@@ -157,6 +152,4 @@ void ScoreKeeperRave::LaunchAttack( AttackLevel al )
|
||||
GAMESTATE->LaunchAttack( pnToAttack, a );
|
||||
|
||||
// SCREENMAN->SystemMessage( ssprintf( "attacking %d with %s", pnToAttack, sAttackToGive.c_str() ) );
|
||||
|
||||
m_soundLaunchAttack.Play();
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
*/
|
||||
|
||||
#include "ScoreKeeper.h"
|
||||
#include "RageSound.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
|
||||
|
||||
@@ -30,9 +29,6 @@ public:
|
||||
protected:
|
||||
void LaunchAttack( AttackLevel al );
|
||||
void AddSuperMeterDelta( float fUnscaledPercentChange );
|
||||
|
||||
RageSound m_soundLaunchAttack;
|
||||
RageSound m_soundAttackEnding;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user