From c5921a91ea39fc72ff7bf5a8f49e26f41c7baffb Mon Sep 17 00:00:00 2001 From: frosch Date: Sat, 5 Jun 2010 15:22:46 +0000 Subject: (svn r19934) -Fix [FS#3857]: When 'pause on new game' is set, pause the game before CleanupGeneration() to avoid conflicts with concurrent GUI code. --- src/genworld.cpp | 1 - src/openttd.cpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/genworld.cpp b/src/genworld.cpp index e433fea33..5ef70655b 100644 --- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -184,7 +184,6 @@ static void _GenerateWorld(void *) if (_network_dedicated) DEBUG(net, 0, "Map generated, starting game"); DEBUG(desync, 1, "new_map: %08x", _settings_game.game_creation.generation_seed); - if (_settings_client.gui.pause_on_newgame && _game_mode == GM_NORMAL) DoCommandP(0, PM_PAUSED_NORMAL, 1, 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); diff --git a/src/openttd.cpp b/src/openttd.cpp index 6e8e44973..554e7dbf1 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -820,6 +820,8 @@ static void MakeNewGameDone() } #endif /* ENABLE_NETWORK */ + if (_settings_client.gui.pause_on_newgame) DoCommandP(0, PM_PAUSED_NORMAL, 1, CMD_PAUSE); + MarkWholeScreenDirty(); } -- cgit v1.2.3-54-g00ecf