diff options
-rw-r--r-- | functions.h | 10 | ||||
-rw-r--r-- | network.c | 3 | ||||
-rw-r--r-- | network.h | 9 | ||||
-rw-r--r-- | openttd.c | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/functions.h b/functions.h index cd59d8fb2..f1323c77d 100644 --- a/functions.h +++ b/functions.h @@ -132,16 +132,6 @@ bool CheckBridge_Stuff(byte bridge_type, uint bridge_len); uint32 GetBridgeLength(TileIndex begin, TileIndex end); int CalcBridgeLenCostFactor(int x); -/* network.c */ -void NetworkUDPClose(void); -void NetworkStartUp(void); -void NetworkShutDown(void); -void NetworkGameLoop(void); -void NetworkUDPGameLoop(void); -bool NetworkServerStart(void); -bool NetworkClientConnectGame(const char* host, unsigned short port); -void NetworkReboot(void); -void NetworkDisconnect(void); /* misc_cmd.c */ void PlaceTreesRandomly(void); @@ -1465,6 +1465,9 @@ void NetworkStartUp(void) // This shuts the network down void NetworkShutDown(void) { + NetworkDisconnect(); + NetworkUDPClose(); + DEBUG(net, 3) ("[NET][Core] Shutting down the network."); _network_available = false; @@ -224,6 +224,15 @@ bool NetworkChangeCompanyPassword(byte argc, char *argv[]); void NetworkPopulateCompanyInfo(void); void CheckMinPlayers(void); +void NetworkStartUp(void); +void NetworkUDPClose(void); +void NetworkShutDown(void); +void NetworkGameLoop(void); +void NetworkUDPGameLoop(void); +bool NetworkServerStart(void); +bool NetworkClientConnectGame(const char* host, unsigned short port); +void NetworkReboot(void); +void NetworkDisconnect(void); #endif /* ENABLE_NETWORK */ // Those variables must always be registered! @@ -509,8 +509,6 @@ int ttd_main(int argc, char *argv[]) if (_network_available) { // Shut down the network and close any open connections NetworkDisconnect(); - NetworkUDPClose(); - NetworkShutDown(); } #endif /* ENABLE_NETWORK */ |