diff options
author | Darkvater <darkvater@openttd.org> | 2006-12-30 01:52:09 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-12-30 01:52:09 +0000 |
commit | f475636186a7c4d3aac9ae8998cdd3cd9f3983f9 (patch) | |
tree | 1966fa0f816ba2f76eb61aa26361eda5de1eb0eb /network.c | |
parent | c87fcab77216fa2a3c8a5a334c32099665b1241d (diff) | |
download | openttd-f475636186a7c4d3aac9ae8998cdd3cd9f3983f9.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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |