summaryrefslogtreecommitdiff
path: root/network_gui.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_gui.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_gui.c')
-rw-r--r--network_gui.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/network_gui.c b/network_gui.c
index 8257e8db0..e3bb1e85e 100644
--- a/network_gui.c
+++ b/network_gui.c
@@ -1271,6 +1271,15 @@ void ShowJoinStatusWindow()
AllocateWindowDesc(&_network_join_status_window_desc);
}
+void ShowJoinStatusWindowAfterJoin()
+{
+ /* This is a special instant of ShowJoinStatusWindow, because
+ it is opened after the map is loaded, but the client maybe is not
+ done registering itself to the server */
+ DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
+ _network_join_status = NETWORK_JOIN_STATUS_REGISTERING;
+ AllocateWindowDesc(&_network_join_status_window_desc);
+}