From a48e3cb891af580dc03e3fe1ae8d4978fad575fe Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 26 Jan 2012 17:24:56 +0000 Subject: (svn r23854) -Codechange: make it easier to put random debug stuff into the random log --- src/core/random_func.cpp | 6 +----- src/core/random_func.hpp | 13 ------------- 2 files changed, 1 insertion(+), 18 deletions(-) (limited to 'src/core') diff --git a/src/core/random_func.cpp b/src/core/random_func.cpp index 5adc17066..7800591e6 100644 --- a/src/core/random_func.cpp +++ b/src/core/random_func.cpp @@ -69,11 +69,7 @@ void SetRandomSeed(uint32 seed) uint32 DoRandom(int line, const char *file) { if (_networking && (!_network_server || (NetworkClientSocket::IsValidID(0) && NetworkClientSocket::Get(0)->status != NetworkClientSocket::STATUS_INACTIVE))) { - static FILE *f = FioFOpenFile("random-out.log", "wb", AUTOSAVE_DIR); - if (f != NULL) { - fprintf(f, "%08x; %02x; %04x; %02x; %s:%d\n", _date, _date_fract, _frame_counter, (byte)_current_company, file, line); - fflush(f); - } + DEBUG(random, 0, "%08x; %02x; %04x; %02x; %s:%d", _date, _date_fract, _frame_counter, (byte)_current_company, file, line); } return _random.Next(); diff --git a/src/core/random_func.hpp b/src/core/random_func.hpp index 8c3bed166..ea0716b9a 100644 --- a/src/core/random_func.hpp +++ b/src/core/random_func.hpp @@ -17,19 +17,6 @@ #define Random OTTD_Random #endif /* __APPLE__ */ -/************** - * Warning: DO NOT enable this unless you understand what it does - * - * If enabled, in a network game all randoms will be dumped to the - * stdout if the first client joins (or if you are a client). This - * is to help finding desync problems. - * - * Warning: DO NOT enable this unless you understand what it does - **************/ - -//#define RANDOM_DEBUG - - /** * Structure to encapsulate the pseudo random number generators. */ -- cgit v1.2.3-54-g00ecf