(svn r7469) -Fix (r7348): NewGRF settings weren't loaded in cases.
authorpeter1138
Sun, 10 Dec 2006 12:12:26 +0000
changeset 5313 ea491c0b40f1
parent 5312 884ebccbd847
child 5314 021dbca1d6da
(svn r7469) -Fix (r7348): NewGRF settings weren't loaded in cases.
openttd.c
--- a/openttd.c	Sun Dec 10 11:46:43 2006 +0000
+++ b/openttd.c	Sun Dec 10 12:12:26 2006 +0000
@@ -615,6 +615,8 @@
 {
 	_game_mode = GM_NORMAL;
 
+	ResetGRFConfig(true);
+
 	GenerateWorldSetCallback(&MakeNewGameDone);
 	GenerateWorld(from_heightmap ? GW_HEIGHTMAP : GW_NEWGAME, 1 << _patches.map_x, 1 << _patches.map_y);
 }
@@ -630,6 +632,8 @@
 {
 	_game_mode = GM_EDITOR;
 
+	ResetGRFConfig(true);
+
 	GenerateWorldSetCallback(&MakeNewEditorWorldDone);
 	GenerateWorld(GW_EMPTY, 1 << _patches.map_x, 1 << _patches.map_y);
 }
@@ -660,6 +664,8 @@
 
 	SetupColorsAndInitialWindow();
 
+	ResetGRFConfig(true);
+
 	// Load game
 	if (SaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode) != SL_OK) {
 		LoadIntroGame();
@@ -799,7 +805,6 @@
 			Player *p;
 
 			_opt_ptr = &_opt;
-			ResetGRFConfig(true);
 
 			_local_player = OWNER_NONE;
 			_generating_world = true;