summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2014-10-28 11:32:19 +0000
committerpeter1138 <peter1138@openttd.org>2014-10-28 11:32:19 +0000
commitcea2c3490a04d9b774fb5da658fb406f26c0f3db (patch)
tree450234850b5edc5e7c52269650ae341968bcd787 /src
parentc2dbe23c88a59b4f24d19c658f1eea541fe8f10e (diff)
downloadopenttd-cea2c3490a04d9b774fb5da658fb406f26c0f3db.tar.xz
(svn r27049) -Fix (r26482): Fix compilation with --enable-desync-debug.
Diffstat (limited to 'src')
-rw-r--r--src/core/random_func.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/core/random_func.cpp b/src/core/random_func.cpp
index 5c1d07940..e4593c407 100644
--- a/src/core/random_func.cpp
+++ b/src/core/random_func.cpp
@@ -13,6 +13,15 @@
#include "random_func.hpp"
#include "bitmath_func.hpp"
+#ifdef RANDOM_DEBUG
+#include "../network/network.h"
+#include "../network/network_server.h"
+#include "../network/network_internal.h"
+#include "../company_func.h"
+#include "../fileio_func.h"
+#include "../date_func.h"
+#endif /* RANDOM_DEBUG */
+
#include "../safeguards.h"
Randomizer _random, _interactive_random;
@@ -62,13 +71,6 @@ void SetRandomSeed(uint32 seed)
}
#ifdef RANDOM_DEBUG
-#include "../network/network.h"
-#include "../network/network_server.h"
-#include "../network/network_internal.h"
-#include "../company_func.h"
-#include "../fileio_func.h"
-#include "../date_func.h"
-
uint32 DoRandom(int line, const char *file)
{
if (_networking && (!_network_server || (NetworkClientSocket::IsValidID(0) && NetworkClientSocket::Get(0)->status != NetworkClientSocket::STATUS_INACTIVE))) {