summaryrefslogtreecommitdiff
path: root/src/date.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-12-29 21:50:25 +0000
committerrubidium <rubidium@openttd.org>2008-12-29 21:50:25 +0000
commit3c6add5293f64f7335fe0ef84606b146ce21a117 (patch)
treeaec6feff3be34ba1d2dd8bd06c23da37e33ff3c1 /src/date.cpp
parentad1c52abf86d241c024a29b5e6d1c2f10f072d1f (diff)
downloadopenttd-3c6add5293f64f7335fe0ef84606b146ce21a117.tar.xz
(svn r14772) -Codechange: make the "dump log of game to reproduce" desync debug stuff a runtime configurable debug option instead of a compile time option.
Diffstat (limited to 'src/date.cpp')
-rw-r--r--src/date.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/date.cpp b/src/date.cpp
index 2b0e6ff09..5827cbc05 100644
--- a/src/date.cpp
+++ b/src/date.cpp
@@ -15,9 +15,7 @@
#include "vehicle_base.h"
#include "debug.h"
#include "rail_gui.h"
-#ifdef DEBUG_DUMP_COMMANDS
#include "saveload.h"
-#endif
Year _cur_year;
Month _cur_month;
@@ -244,12 +242,12 @@ void IncreaseDate()
/* yes, call various monthly loops */
if (_game_mode != GM_MENU) {
-#ifdef DEBUG_DUMP_COMMANDS
- char name[MAX_PATH];
- snprintf(name, lengthof(name), "dmp_cmds_%d.sav", _date);
- SaveOrLoad(name, SL_SAVE, AUTOSAVE_DIR);
- DebugDumpCommands("ddc:save:%s\n", name);
-#endif /* DUMP_COMMANDS */
+ if (_debug_desync_level > 2) {
+ char name[MAX_PATH];
+ snprintf(name, lengthof(name), "dmp_cmds_%08x_%08x.sav", _settings_game.game_creation.generation_seed, _date);
+ SaveOrLoad(name, SL_SAVE, AUTOSAVE_DIR);
+ }
+
if (_settings_client.gui.autosave != 0 && (_cur_month % _autosave_months[_settings_client.gui.autosave]) == 0) {
_do_autosave = true;
RedrawAutosave();