diff options
author | rubidium <rubidium@openttd.org> | 2008-02-03 16:21:19 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-02-03 16:21:19 +0000 |
commit | 4a4f4b7459e5c47a9024c944bab1bd18d83ca98c (patch) | |
tree | bd9758e26b762122f28225ab720f2e6fa4dc857c /src | |
parent | 70a6179b3b44d1a27d1b711a662a3c00e1440a39 (diff) | |
download | openttd-4a4f4b7459e5c47a9024c944bab1bd18d83ca98c.tar.xz |
(svn r12050) -Fix: random_func broke for desync debug.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/random_func.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/random_func.cpp b/src/core/random_func.cpp index f74309a6e..56792ca63 100644 --- a/src/core/random_func.cpp +++ b/src/core/random_func.cpp @@ -131,13 +131,16 @@ void SetRandomSeed(uint32 seed) #ifdef RANDOM_DEBUG #include "../network/network_data.h" +#include "../variables.h" /* _frame_counter */ +#include "../player_func.h" + uint32 DoRandom(int line, const char *file) { if (_networking && (DEREF_CLIENT(0)->status != STATUS_INACTIVE || !_network_server)) { printf("Random [%d/%d] %s:%d\n",_frame_counter, (byte)_current_player, file, line); } - return _random->Next() + return _random.Next(); } #endif /* RANDOM_DEBUG */ #endif /* MERSENNE_TWISTER */ |