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_soundMine.SetParams( p );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_soundAttackLaunch.Load( THEME->GetPathToS(ssprintf("Player attack launch p%d",pn+1)), true );
|
/* Attacks can be launched in course modes and in battle modes. They both come
|
||||||
m_soundAttackEnding.Load( THEME->GetPathToS(ssprintf("Player attack ending p%d",pn+1)), true );
|
* 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 )
|
void PlayerMinus::Update( float fDeltaTime )
|
||||||
|
|||||||
@@ -24,9 +24,6 @@ CachedThemeMetricF ATTACK_DURATION_SECONDS ("ScoreKeeperRave","AttackDurationSec
|
|||||||
ScoreKeeperRave::ScoreKeeperRave(PlayerNumber pn) : ScoreKeeper(pn)
|
ScoreKeeperRave::ScoreKeeperRave(PlayerNumber pn) : ScoreKeeper(pn)
|
||||||
{
|
{
|
||||||
ATTACK_DURATION_SECONDS.Refresh();
|
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 )
|
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 )
|
void ScoreKeeperRave::Update( float fDelta )
|
||||||
{
|
{
|
||||||
if( GAMESTATE->m_bAttackEndedThisUpdate[m_PlayerNumber] )
|
|
||||||
m_soundAttackEnding.Play();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScoreKeeperRave::LaunchAttack( AttackLevel al )
|
void ScoreKeeperRave::LaunchAttack( AttackLevel al )
|
||||||
@@ -157,6 +152,4 @@ void ScoreKeeperRave::LaunchAttack( AttackLevel al )
|
|||||||
GAMESTATE->LaunchAttack( pnToAttack, a );
|
GAMESTATE->LaunchAttack( pnToAttack, a );
|
||||||
|
|
||||||
// SCREENMAN->SystemMessage( ssprintf( "attacking %d with %s", pnToAttack, sAttackToGive.c_str() ) );
|
// SCREENMAN->SystemMessage( ssprintf( "attacking %d with %s", pnToAttack, sAttackToGive.c_str() ) );
|
||||||
|
|
||||||
m_soundLaunchAttack.Play();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ScoreKeeper.h"
|
#include "ScoreKeeper.h"
|
||||||
#include "RageSound.h"
|
|
||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -30,9 +29,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void LaunchAttack( AttackLevel al );
|
void LaunchAttack( AttackLevel al );
|
||||||
void AddSuperMeterDelta( float fUnscaledPercentChange );
|
void AddSuperMeterDelta( float fUnscaledPercentChange );
|
||||||
|
|
||||||
RageSound m_soundLaunchAttack;
|
|
||||||
RageSound m_soundAttackEnding;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user