summaryrefslogtreecommitdiff
path: root/src
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
commit9a93718898df3c3dabc994d686d8745de1d7bf19 (patch)
tree05fcba5212d0bd746ad4e8642d5d107f98ad3de8 /src
parentf42734a5ff487c808c2289bd0a61ffa413a25ce5 (diff)
downloadopenttd-9a93718898df3c3dabc994d686d8745de1d7bf19.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 ;))
Diffstat (limited to 'src')
-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;
}