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
+4 -3
View File
@@ -1198,10 +1198,11 @@ void StepMania::InsertCoin( int iNum, bool bCountInBookkeeping )
else
SCREENMAN->PlayInvalidSound();
/* If AutoJoin and enough coins to join have been inserted, then try to join a player. */
if( GAMESTATE->m_bAutoJoin.Get() )
/* 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->m_bAutoJoin.Get() && GAMESTATE->GetNumSidesJoined() > 0 )
{
if( GAMESTATE->JoinPlayers() )
if( GAMESTATE->GetNumSidesJoined() > 0 && GAMESTATE->JoinPlayers() )
SCREENMAN->PlayStartSound();
}