Screen::JoinInput -> GameState::JoinInput
This commit is contained in:
@@ -219,29 +219,6 @@ RString Screen::GetPrevScreen() const
|
||||
return PREV_SCREEN;
|
||||
}
|
||||
|
||||
|
||||
bool Screen::JoinInput( PlayerNumber pn )
|
||||
{
|
||||
if( !GAMESTATE->PlayersCanJoin() )
|
||||
return false;
|
||||
|
||||
/* If this side is already in, don't re-join (and re-pay!). */
|
||||
if(GAMESTATE->m_bSideIsJoined[pn])
|
||||
return false;
|
||||
|
||||
/* subtract coins */
|
||||
int iCoinsNeededToJoin = GAMESTATE->GetCoinsNeededToJoin();
|
||||
|
||||
if( GAMESTATE->m_iCoins < iCoinsNeededToJoin )
|
||||
return false; // not enough coins
|
||||
|
||||
GAMESTATE->m_iCoins -= iCoinsNeededToJoin;
|
||||
|
||||
GAMESTATE->JoinPlayer( pn );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Screen::PostScreenMessage( const ScreenMessage SM, float fDelay )
|
||||
{
|
||||
ASSERT( fDelay >= 0.0 );
|
||||
|
||||
Reference in New Issue
Block a user