changeset 11079:7677868d1626 draft

(svn r15422) -Fix [FS#2623] (r15383): loading NewGRFs before copying the settings.
author rubidium <rubidium@openttd.org>
date Sun, 08 Feb 2009 23:06:56 +0000
parents b5a69b96d311
children 02d314ea4f63
files src/genworld.cpp src/openttd.cpp
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/genworld.cpp
+++ b/src/genworld.cpp
@@ -284,13 +284,13 @@
 	/* 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();
 
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -649,6 +649,10 @@
 	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();