Mercurial > hg > openttd
changeset 4829:640f36a9346e draft
(svn r6753) -Codechange: Move some function declerations from functions.h into network.h
and let NetworkDisconnect handle all shutdown related operations.
author | Darkvater <Darkvater@openttd.org> |
---|---|
date | Thu, 12 Oct 2006 14:48:36 +0000 |
parents | 94deb59a0d47 |
children | 4f6ff5b2a5be |
files | functions.h network.c network.h openttd.c |
diffstat | 4 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/functions.h +++ b/functions.h @@ -132,16 +132,6 @@ 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);
--- a/network.c +++ b/network.c @@ -1465,6 +1465,9 @@ // This shuts the network down void NetworkShutDown(void) { + NetworkDisconnect(); + NetworkUDPClose(); + DEBUG(net, 3) ("[NET][Core] Shutting down the network."); _network_available = false;
--- a/network.h +++ b/network.h @@ -224,6 +224,15 @@ 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!