mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-08 23:19:40 +00:00
(svn r6753) -Codechange: Move some function declerations from functions.h into network.h
and let NetworkDisconnect handle all shutdown related operations.
This commit is contained in:
parent
110fc94cb5
commit
15bf48acfd
10
functions.h
10
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!
|
||||
|
Loading…
Reference in New Issue
Block a user