summaryrefslogtreecommitdiff
path: root/network_client.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-15 21:13:52 +0000
committertruelight <truelight@openttd.org>2004-12-15 21:13:52 +0000
commitfa1f026367aeb862b0cecd5c29cf680e37b45b3d (patch)
tree7dad5cae0e7fb3089a2b3e52a45d1b9e3a90e1f0 /network_client.c
parent9595ee80e3014ea90d2680e1c9135fb01532e0c0 (diff)
downloadopenttd-fa1f026367aeb862b0cecd5c29cf680e37b45b3d.tar.xz
(svn r1108) -Fix: [Network] Fixed problem around slow clients:
They joined, they got the map, but it took some time before the new player was created. In this time a player could do stuff, causing a player-id-mismatch, and the player was kicked out. Now a player get's a nice GUI which says: registering.. When that is gone, the player is joined and can play safely. Tnx to Moriarty for bugging me with this bug ;)
Diffstat (limited to 'network_client.c')
-rw-r--r--network_client.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/network_client.c b/network_client.c
index ab87aae7d..c0e69ca5b 100644
--- a/network_client.c
+++ b/network_client.c
@@ -487,8 +487,6 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MAP)
}
_opt_mod_ptr = &_opt;
- DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
-
// Say we received the map and loaded it correctly!
SEND_COMMAND(PACKET_CLIENT_MAP_OK)();
@@ -498,6 +496,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MAP)
if (_network_playas == OWNER_SPECTATOR) {
// The client wants to be a spectator..
_local_player = OWNER_SPECTATOR;
+ DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
} else {
// send a command to make a new player
_local_player = 0;