summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--console_cmds.c10
-rw-r--r--network.c18
-rw-r--r--network_client.c5
-rw-r--r--network_data.c6
-rw-r--r--network_gamelist.c4
-rw-r--r--network_gui.c5
-rw-r--r--network_server.c5
-rw-r--r--network_udp.c5
8 files changed, 26 insertions, 32 deletions
diff --git a/console_cmds.c b/console_cmds.c
index 39f34cfb2..feddff87d 100644
--- a/console_cmds.c
+++ b/console_cmds.c
@@ -22,11 +22,7 @@
#include "screenshot.h"
#include "genworld.h"
#include "date.h"
-
-#ifdef ENABLE_NETWORK
- #include "table/strings.h"
- #include "network.h"
-#endif /*ENABLE_NETWORK*/
+#include "network.h"
// ** scriptfile handling ** //
static FILE *_script_file;
@@ -1193,6 +1189,10 @@ DEF_CONSOLE_CMD(ConSay)
return true;
}
+#ifdef ENABLE_NETWORK
+ #include "table/strings.h"
+#endif /* ENABLE_NETWORK */
+
DEF_CONSOLE_CMD(ConPlayers)
{
Player *p;
diff --git a/network.c b/network.c
index 7034e65c7..88e893b09 100644
--- a/network.c
+++ b/network.c
@@ -1,16 +1,7 @@
/* $Id$ */
#include "stdafx.h"
-#include "openttd.h"
-#include "debug.h"
-#include "functions.h"
-#include "string.h"
-#include "strings.h"
-#include "map.h"
#include "network_data.h"
-#include "command.h"
-#include "variables.h"
-#include "date.h"
#if defined(WITH_REV)
extern const char _openttd_revision[];
@@ -24,6 +15,15 @@
#ifdef ENABLE_NETWORK
+#include "openttd.h"
+#include "debug.h"
+#include "functions.h"
+#include "string.h"
+#include "strings.h"
+#include "map.h"
+#include "command.h"
+#include "variables.h"
+#include "date.h"
#include "table/strings.h"
#include "network_client.h"
#include "network_server.h"
diff --git a/network_client.c b/network_client.c
index db78632e3..5dcef49c2 100644
--- a/network_client.c
+++ b/network_client.c
@@ -1,14 +1,13 @@
/* $Id$ */
+#ifdef ENABLE_NETWORK
+
#include "stdafx.h"
#include "debug.h"
#include "string.h"
#include "strings.h"
#include "network_data.h"
#include "date.h"
-
-#ifdef ENABLE_NETWORK
-
#include "table/strings.h"
#include "functions.h"
#include "network_client.h"
diff --git a/network_data.c b/network_data.c
index ac011f22a..ea2418dc8 100644
--- a/network_data.c
+++ b/network_data.c
@@ -1,12 +1,10 @@
/* $Id$ */
+#ifdef ENABLE_NETWORK
+
#include "stdafx.h"
#include "debug.h"
#include "network_data.h"
-
-// Is the network enabled?
-#ifdef ENABLE_NETWORK
-
#include "functions.h"
#include "string.h"
#include "table/strings.h"
diff --git a/network_gamelist.c b/network_gamelist.c
index e6e68d122..a49a0159d 100644
--- a/network_gamelist.c
+++ b/network_gamelist.c
@@ -1,11 +1,11 @@
/* $Id$ */
+#ifdef ENABLE_NETWORK
+
#include "stdafx.h"
#include "debug.h"
#include "network_data.h"
-#ifdef ENABLE_NETWORK
-
// This file handles the GameList
// Also, it handles the request to a server for data about the server
diff --git a/network_gui.c b/network_gui.c
index a212a8f6f..142105fa9 100644
--- a/network_gui.c
+++ b/network_gui.c
@@ -1,5 +1,6 @@
/* $Id$ */
+#ifdef ENABLE_NETWORK
#include "stdafx.h"
#include "openttd.h"
#include "string.h"
@@ -9,13 +10,11 @@
#include "date.h"
#include "fios.h"
-
-#ifdef ENABLE_NETWORK
-
#include "table/strings.h"
#include "functions.h"
#include "network_data.h"
#include "network_client.h"
+#include "network_gui.h"
#include "network_gamelist.h"
#include "window.h"
#include "gui.h"
diff --git a/network_server.c b/network_server.c
index 840994b66..eb13b0cdc 100644
--- a/network_server.c
+++ b/network_server.c
@@ -1,5 +1,7 @@
/* $Id$ */
+#ifdef ENABLE_NETWORK
+
#include "stdafx.h"
#include "debug.h"
#include "string.h"
@@ -7,9 +9,6 @@
#include "network_data.h"
#include "train.h"
#include "date.h"
-
-#ifdef ENABLE_NETWORK
-
#include "table/strings.h"
#include "functions.h"
#include "network_server.h"
diff --git a/network_udp.c b/network_udp.c
index 5ec1f2376..932de9d9e 100644
--- a/network_udp.c
+++ b/network_udp.c
@@ -1,13 +1,12 @@
/* $Id$ */
+#ifdef ENABLE_NETWORK
+
#include "stdafx.h"
#include "debug.h"
#include "string.h"
#include "network_data.h"
#include "date.h"
-
-#ifdef ENABLE_NETWORK
-
#include "map.h"
#include "network_gamelist.h"
#include "network_udp.h"