SetPlayerBalance -> GetPlayerBalance
This commit is contained in:
@@ -717,13 +717,13 @@ float GameSoundManager::GetPlayLatency() const
|
|||||||
return SOUNDMAN->GetPlayLatency();
|
return SOUNDMAN->GetPlayLatency();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameSoundManager::SetPlayerBalance( PlayerNumber pn, RageSoundParams ¶ms )
|
float GameSoundManager::GetPlayerBalance( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
/* If two players are active, play sounds on each players' side. */
|
/* If two players are active, play sounds on each players' side. */
|
||||||
if( GAMESTATE->GetNumPlayersEnabled() == 2 )
|
if( GAMESTATE->GetNumPlayersEnabled() == 2 )
|
||||||
params.m_Balance = (pn == PLAYER_1)? -1.0f:1.0f;
|
return (pn == PLAYER_1)? -1.0f:1.0f;
|
||||||
else
|
else
|
||||||
params.m_Balance = 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public:
|
|||||||
void HandleSongTimer( bool on=true );
|
void HandleSongTimer( bool on=true );
|
||||||
float GetFrameTimingAdjustment( float fDeltaTime );
|
float GetFrameTimingAdjustment( float fDeltaTime );
|
||||||
|
|
||||||
static void SetPlayerBalance( PlayerNumber pn, RageSoundParams ¶ms );
|
static float GetPlayerBalance( PlayerNumber pn );
|
||||||
|
|
||||||
// Lua
|
// Lua
|
||||||
void PushSelf( lua_State *L );
|
void PushSelf( lua_State *L );
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ void Player::Init(
|
|||||||
|
|
||||||
|
|
||||||
RageSoundParams p;
|
RageSoundParams p;
|
||||||
GameSoundManager::SetPlayerBalance( pn, p );
|
p.m_Balance = GameSoundManager::GetPlayerBalance( pn );
|
||||||
|
|
||||||
m_soundMine.SetParams( p );
|
m_soundMine.SetParams( p );
|
||||||
m_soundAttackLaunch.SetParams( p );
|
m_soundAttackLaunch.SetParams( p );
|
||||||
@@ -466,7 +466,7 @@ void Player::Load()
|
|||||||
m_vKeysounds.resize( pSong->m_vsKeysoundFile.size() );
|
m_vKeysounds.resize( pSong->m_vsKeysoundFile.size() );
|
||||||
|
|
||||||
RageSoundParams p;
|
RageSoundParams p;
|
||||||
GameSoundManager::SetPlayerBalance( pn, p );
|
p.m_Balance = GameSoundManager::GetPlayerBalance( pn );
|
||||||
for( unsigned i=0; i<m_vKeysounds.size(); i++ )
|
for( unsigned i=0; i<m_vKeysounds.size(); i++ )
|
||||||
{
|
{
|
||||||
RString sKeysoundFilePath = sSongDir + pSong->m_vsKeysoundFile[i];
|
RString sKeysoundFilePath = sSongDir + pSong->m_vsKeysoundFile[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user