summaryrefslogtreecommitdiff
path: root/network.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-12-30 01:52:09 +0000
committerDarkvater <Darkvater@openttd.org>2006-12-30 01:52:09 +0000
commit6250b90a6bfe73d96ec02e9bc81af323f55b857d (patch)
tree1966fa0f816ba2f76eb61aa26361eda5de1eb0eb /network.c
parent990270fda928f7ce9e0638189b8fc65683583e71 (diff)
downloadopenttd-6250b90a6bfe73d96ec02e9bc81af323f55b857d.tar.xz
(svn r7638) -Codechange: Remove special window ShowJoinStatusWindowAfterJoin and shuffle around
some code for SetupColorsAndInitialWindow. Because we know that after a successful load all windows are removed we can setup default windows in this function, and show ShowJoinStatusWindow in PACKET_SERVER_MAP. -Setup the global _network_join_status for ShowJoinStatusWindow in the only two places where the function is called, instead of inside it. -Turn the join status window into a modal window of the network window so it stays on top.
Diffstat (limited to 'network.c')
-rw-r--r--network.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/network.c b/network.c
index 13f24ef0a..8b5b9ceef 100644
--- a/network.c
+++ b/network.c
@@ -29,6 +29,7 @@
#include "network_server.h"
#include "network_udp.h"
#include "network_gamelist.h"
+#include "network_gui.h"
#include "console.h" /* IConsoleCmdExec */
#include <stdarg.h> /* va_list */
#include "md5.h"
@@ -47,7 +48,6 @@ static byte _network_clients_connected = 0;
static uint16 _network_client_index = NETWORK_SERVER_INDEX + 1;
/* Some externs / forwards */
-extern void ShowJoinStatusWindow(void);
extern void StateGameLoop(void);
// Function that looks up the CI for a given client-index
@@ -689,6 +689,7 @@ static bool NetworkConnect(const char *hostname, int port)
// in client mode, only the first client field is used. it's pointing to the server.
NetworkAllocClient(s);
+ _network_join_status = NETWORK_JOIN_STATUS_CONNECTING;
ShowJoinStatusWindow();
return true;