Don't play sounds in JoinInput; let the caller do that.
Localize "only play start sound for the 2nd player who joins" hack into ScreenSelect.
This commit is contained in:
@@ -237,12 +237,6 @@ bool Screen::JoinInput( PlayerNumber pn )
|
|||||||
|
|
||||||
GAMESTATE->m_iCoins -= iCoinsNeededToJoin;
|
GAMESTATE->m_iCoins -= iCoinsNeededToJoin;
|
||||||
|
|
||||||
// HACK: Only play start sound for the 2nd player who joins. The
|
|
||||||
// start sound for the 1st player will be played by ScreenTitleMenu
|
|
||||||
// when the player makes a selection on the screen.
|
|
||||||
if( GAMESTATE->GetNumSidesJoined() > 0 )
|
|
||||||
SCREENMAN->PlayStartSound();
|
|
||||||
|
|
||||||
GAMESTATE->JoinPlayer( pn );
|
GAMESTATE->JoinPlayer( pn );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -144,6 +144,12 @@ void ScreenSelect::Input( const InputEventPlus &input )
|
|||||||
|
|
||||||
if( input.MenuI == MENU_BUTTON_START && input.type == IET_FIRST_PRESS && JoinInput(input.pn) )
|
if( input.MenuI == MENU_BUTTON_START && input.type == IET_FIRST_PRESS && JoinInput(input.pn) )
|
||||||
{
|
{
|
||||||
|
// HACK: Only play start sound for the 2nd player who joins. The
|
||||||
|
// start sound for the 1st player will be played by ScreenTitleMenu
|
||||||
|
// when the player makes a selection on the screen.
|
||||||
|
if( GAMESTATE->GetNumSidesJoined() > 1 )
|
||||||
|
SCREENMAN->PlayStartSound();
|
||||||
|
|
||||||
this->UpdateSelectableChoices();
|
this->UpdateSelectableChoices();
|
||||||
|
|
||||||
if( !ALLOW_DISABLED_PLAYER_INPUT )
|
if( !ALLOW_DISABLED_PLAYER_INPUT )
|
||||||
|
|||||||
Reference in New Issue
Block a user