summaryrefslogtreecommitdiff
path: root/openttd.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-10-12 14:59:27 +0000
committerDarkvater <darkvater@openttd.org>2006-10-12 14:59:27 +0000
commitcad526ef3658ad6420939a6d51707c9dbfee97c3 (patch)
tree9d8040d778bee72bdeda716299434c03e98d3b14 /openttd.c
parent15bf48acfda4ce5e5291e0a68292d7f9d9b6a569 (diff)
downloadopenttd-cad526ef3658ad6420939a6d51707c9dbfee97c3.tar.xz
(svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
disabled hardcode _networking/_network_available to zero and let the compiler handle all optimizations.
Diffstat (limited to 'openttd.c')
-rw-r--r--openttd.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/openttd.c b/openttd.c
index 02ea57537..e46b6a14c 100644
--- a/openttd.c
+++ b/openttd.c
@@ -453,10 +453,7 @@ int ttd_main(int argc, char *argv[])
// restore saved music volume
_music_driver->set_volume(msf.music_vol);
-#ifdef ENABLE_NETWORK
- // initialize network-core
- NetworkStartUp();
-#endif /* ENABLE_NETWORK */
+ NetworkStartUp(); // initialize network-core
_opt_ptr = &_opt_newgame;
@@ -505,12 +502,7 @@ int ttd_main(int argc, char *argv[])
WaitTillSaved();
IConsoleFree();
-#ifdef ENABLE_NETWORK
- if (_network_available) {
- // Shut down the network and close any open connections
- NetworkDisconnect();
- }
-#endif /* ENABLE_NETWORK */
+ if (_network_available) NetworkShutDown(); // Shut down the network and close any open connections
_video_driver->stop();
_music_driver->stop();
@@ -986,8 +978,7 @@ void GameLoop(void)
#ifdef ENABLE_NETWORK
// Check for UDP stuff
- if (_network_available)
- NetworkUDPGameLoop();
+ if (_network_available) NetworkUDPGameLoop();
if (_networking && !IsGeneratingWorld()) {
// Multiplayer