diff options
author | Darkvater <darkvater@openttd.org> | 2006-10-12 14:48:36 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-10-12 14:48:36 +0000 |
commit | 15bf48acfda4ce5e5291e0a68292d7f9d9b6a569 (patch) | |
tree | eba2d3604689aa9e8702463f6611e3aaa06c39ab | |
parent | 110fc94cb539fcb742e8c01ee52e130d4ca9989e (diff) | |
download | openttd-15bf48acfda4ce5e5291e0a68292d7f9d9b6a569.tar.xz |
(svn r6753) -Codechange: Move some function declerations from functions.h into network.h
and let NetworkDisconnect handle all shutdown related operations.
-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 */ |