From 7b8c13fa5c7cdaac1342fd7c8244721739e2354c Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 8 Feb 2009 23:06:56 +0000 Subject: [PATCH] (svn r15422) -Fix [FS#2623] (r15383): loading NewGRFs before copying the settings. --- src/genworld.cpp | 6 +++--- src/openttd.cpp | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/genworld.cpp b/src/genworld.cpp index d1955f27d6..07f98fa589 100644 --- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -284,13 +284,13 @@ void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y) /* Set the date before loading sprites as some newgrfs check it */ SetDate(ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1)); + InitializeGame(_gw.size_x, _gw.size_y, false); + PrepareGenerateWorldProgress(); + /* Load the right landscape stuff */ GfxLoadSprites(); LoadStringWidthTable(); - InitializeGame(_gw.size_x, _gw.size_y, false); - PrepareGenerateWorldProgress(); - /* Re-init the windowing system */ ResetWindowSystem(); diff --git a/src/openttd.cpp b/src/openttd.cpp index 85c51cce77..21b9ed4d95 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -649,6 +649,10 @@ int ttd_main(int argc, char *argv[]) InitializeGUI(); IConsoleCmdExec("exec scripts/autoexec.scr 0"); + /* Initialise the sprite/string tables. */ + GfxLoadSprites(); + LoadStringWidthTable(); + GenerateWorld(GW_EMPTY, 64, 64); // Make the viewport initialization happy WaitTillGeneratedWorld();