summaryrefslogtreecommitdiff
path: root/src/genworld.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/genworld.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/genworld.cpp')
-rw-r--r--src/genworld.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/genworld.cpp b/src/genworld.cpp
index 0a2b49d5b..23a978272 100644
--- a/src/genworld.cpp
+++ b/src/genworld.cpp
@@ -26,6 +26,7 @@
#include "newgrf_storage.h"
#include "water.h"
#include "tilehighlight_func.h"
+#include "saveload.h"
#include "table/sprites.h"
@@ -163,8 +164,14 @@ static void _GenerateWorld(void *arg)
MarkWholeScreenDirty();
if (_network_dedicated) DEBUG(net, 0, "Map generated, starting game");
+ DEBUG(desync, 1, "new_map: %i\n", _settings_game.game_creation.generation_seed);
if (_settings_client.gui.pause_on_newgame && _game_mode == GM_NORMAL) DoCommandP(0, 1, 0, CMD_PAUSE);
+ if (_debug_desync_level > 0) {
+ 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);
+ }
} catch (...) {
_generating_world = false;
throw;