From cc6ee1840a4ba53ffe5b5f7975b1ddb93b0e393e Mon Sep 17 00:00:00 2001 From: truelight Date: Fri, 22 Jun 2007 22:14:42 +0000 Subject: (svn r10284) -Fix [FS#899]: in the unlucky event 2 clients join at the same time to start a new company while there is only one spot left, all clients became spectator. Now only make either one of the joining clients spectator (much more game-friendly ;)) --- src/players.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/players.cpp b/src/players.cpp index 56c117c94..0b4144614 100644 --- a/src/players.cpp +++ b/src/players.cpp @@ -840,12 +840,10 @@ CommandCost CmdPlayerCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) NetworkClientInfo *ci = &_network_client_info[cid]; ci->client_playas = PLAYER_SPECTATOR; NetworkUpdateClientInfo(ci->client_index); - } else -#endif /* ENABLE_NETWORK */ - { + } else if (_local_player == PLAYER_SPECATOR) { _network_playas = PLAYER_SPECTATOR; - SetLocalPlayer(PLAYER_SPECTATOR); } +#endif /* ENABLE_NETWORK */ break; } -- cgit v1.2.3-70-g09d2