summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-13 17:34:05 +0000
committerrubidium <rubidium@openttd.org>2007-06-13 17:34:05 +0000
commit197a8fd5f3faebdee4845bcc298145f7623dc7e7 (patch)
tree608cac548a8b8ace91dd62d682965f7d498a36fd
parent8a1c9187a1639bea83c371c045d7a96473f0a891 (diff)
downloadopenttd-197a8fd5f3faebdee4845bcc298145f7623dc7e7.tar.xz
(svn r10145) -Fix: make compiling with networking disabled (again) possible.
-rw-r--r--src/intro_gui.cpp2
-rw-r--r--src/main_gui.cpp2
-rw-r--r--src/oldloader.cpp2
-rw-r--r--src/strings.cpp4
4 files changed, 9 insertions, 1 deletions
diff --git a/src/intro_gui.cpp b/src/intro_gui.cpp
index 7a0c7a954..6378d0252 100644
--- a/src/intro_gui.cpp
+++ b/src/intro_gui.cpp
@@ -64,9 +64,11 @@ static void SelectGameWndProc(Window *w, WindowEvent *e)
break;
case WE_CLICK:
+#ifdef ENABLE_NETWORK
/* Do not create a network server when you (just) have closed one of the game
* creation/load windows for the network server. */
if (2 <= e->we.click.widget && e->we.click.widget <= 6) _is_network_server = false;
+#endif /* ENABLE_NETWORK */
switch (e->we.click.widget) {
case 2: ShowGenerateLandscape(); break;
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 76a778fc0..35f51ec3c 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -61,6 +61,7 @@ extern bool GenerateTowns();
void CcGiveMoney(bool success, TileIndex tile, uint32 p1, uint32 p2)
{
+#ifdef ENABLE_NETWORK
if (!success) return;
char msg[20];
@@ -72,6 +73,7 @@ void CcGiveMoney(bool success, TileIndex tile, uint32 p1, uint32 p2)
} else {
NetworkServer_HandleChat(NETWORK_ACTION_GIVE_MONEY, DESTTYPE_TEAM, p2, msg, NETWORK_SERVER_INDEX);
}
+#endif /* ENABLE_NETWORK */
}
void HandleOnEditText(const char *str)
diff --git a/src/oldloader.cpp b/src/oldloader.cpp
index 3b36da278..fbc601bad 100644
--- a/src/oldloader.cpp
+++ b/src/oldloader.cpp
@@ -22,7 +22,7 @@
#include "signs.h"
#include "debug.h"
#include "depot.h"
-#include "network/network.h"
+#include "newgrf_config.h"
#include "ai/ai.h"
#include "date.h"
diff --git a/src/strings.cpp b/src/strings.cpp
index 8e0b7942f..603371029 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -1101,7 +1101,11 @@ StringID RemapOldStringID(StringID s)
}
}
+#ifdef ENABLE_NETWORK
extern void SortNetworkLanguages();
+#else /* ENABLE_NETWORK */
+static inline void SortNetworkLanguages() {}
+#endif /* ENABLE_NETWORK */
extern void SortTownGeneratorNames();
bool ReadLanguagePack(int lang_index)