AutoJoin logic change: Rather than always joining on any coin input,

join on the first JoinInput; later (if more coins are input), join
on coin input if there's already a player joined.  This means coin
inputs never join the first player, which implies that coin inputs
can only autojoin a player if it's in a place where players are supposed
to be joined.

This avoids problems with joining too early, eg. in Attract before
Reset.
This commit is contained in:
Glenn Maynard
2008-06-11 22:19:43 +00:00
parent 2e1705ac46
commit bc0cf8acd1
2 changed files with 7 additions and 7 deletions
+3 -4
View File
@@ -128,12 +128,11 @@ void ScreenWithMenuElements::BeginScreen()
/* Evaluate FirstUpdateCommand. */
this->PlayCommand( "FirstUpdate" );
/* If AutoJoin is enabled, we may have a credit that couldn't be used to join when
* the coin was inserted due to AllowLateJoin being disabled at the time. Try to
* join players when a new screen starts. */
/* If AutoJoin and a player is already joined, then try to join a player. (If no players
* are joined, they'll join on the first JoinInput.) */
if( GAMESTATE->GetCoinMode() == CoinMode_Pay && GAMESTATE->m_bAutoJoin.Get() )
{
if( GAMESTATE->JoinPlayers() )
if( GAMESTATE->GetNumSidesJoined() > 0 && GAMESTATE->JoinPlayers() )
SCREENMAN->PlayStartSound();
}
}