unwrap
This commit is contained in:
+25
-27
@@ -241,41 +241,39 @@ bool Screen::JoinInput( const InputEventPlus &input )
|
|||||||
if( !GAMESTATE->PlayersCanJoin() )
|
if( !GAMESTATE->PlayersCanJoin() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( input.MenuI == MENU_BUTTON_START )
|
if( input.MenuI != MENU_BUTTON_START )
|
||||||
{
|
return false;
|
||||||
/* If this side is already in, don't re-join (and re-pay!). */
|
|
||||||
if(GAMESTATE->m_bSideIsJoined[input.pn])
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/* subtract coins */
|
/* If this side is already in, don't re-join (and re-pay!). */
|
||||||
int iCoinsNeededToJoin = GAMESTATE->GetCoinsNeededToJoin();
|
if(GAMESTATE->m_bSideIsJoined[input.pn])
|
||||||
|
return false;
|
||||||
|
|
||||||
if( GAMESTATE->m_iCoins < iCoinsNeededToJoin )
|
/* subtract coins */
|
||||||
return false; // not enough coins
|
int iCoinsNeededToJoin = GAMESTATE->GetCoinsNeededToJoin();
|
||||||
|
|
||||||
GAMESTATE->m_iCoins -= iCoinsNeededToJoin;
|
if( GAMESTATE->m_iCoins < iCoinsNeededToJoin )
|
||||||
|
return false; // not enough coins
|
||||||
|
|
||||||
// HACK: Only play start sound for the 2nd player who joins. The
|
GAMESTATE->m_iCoins -= iCoinsNeededToJoin;
|
||||||
// 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( 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() > 0 )
|
||||||
|
SCREENMAN->PlayStartSound();
|
||||||
|
|
||||||
// don't load memory card profiles here. It's slow and can cause a big skip.
|
GAMESTATE->JoinPlayer( input.pn );
|
||||||
/* Don't load the local profile, either. It causes a 150+ms skip on my A64 3000+,
|
|
||||||
* so it probably causes a skip for everyone. We probably shouldn't load this here,
|
|
||||||
* anyway: leave it unloaded and display "INSERT CARD" until the normal time, and
|
|
||||||
* load the local profile at the time we would have loaded the memory card if none
|
|
||||||
* was inserted (via LoadFirstAvailableProfile). */
|
|
||||||
// PROFILEMAN->LoadLocalProfileFromMachine( pn );
|
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
|
||||||
|
|
||||||
return true;
|
// don't load memory card profiles here. It's slow and can cause a big skip.
|
||||||
}
|
/* Don't load the local profile, either. It causes a 150+ms skip on my A64 3000+,
|
||||||
|
* so it probably causes a skip for everyone. We probably shouldn't load this here,
|
||||||
|
* anyway: leave it unloaded and display "INSERT CARD" until the normal time, and
|
||||||
|
* load the local profile at the time we would have loaded the memory card if none
|
||||||
|
* was inserted (via LoadFirstAvailableProfile). */
|
||||||
|
// PROFILEMAN->LoadLocalProfileFromMachine( pn );
|
||||||
|
SCREENMAN->RefreshCreditsMessages();
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user