forked from mirror/OpenTTD
(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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user