summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-06-22 22:14:42 +0000
committertruelight <truelight@openttd.org>2007-06-22 22:14:42 +0000
commitcc6ee1840a4ba53ffe5b5f7975b1ddb93b0e393e (patch)
tree05fcba5212d0bd746ad4e8642d5d107f98ad3de8
parenta56661fcc17134a26bf2df5cc12be0e0c0eac149 (diff)
downloadopenttd-cc6ee1840a4ba53ffe5b5f7975b1ddb93b0e393e.tar.xz
(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 ;))
-rw-r--r--src/players.cpp6
1 files 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;
}