summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--functions.h10
-rw-r--r--network.c3
-rw-r--r--network.h9
-rw-r--r--openttd.c2
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);
diff --git a/network.c b/network.c
index 88e893b09..f961e16e0 100644
--- a/network.c
+++ b/network.c
@@ -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;
diff --git a/network.h b/network.h
index 5e0d0ac11..af7aeb405 100644
--- a/network.h
+++ b/network.h
@@ -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!
diff --git a/openttd.c b/openttd.c
index ee2b0234b..02ea57537 100644
--- a/openttd.c
+++ b/openttd.c
@@ -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 */