summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-21 16:39:36 +0000
committerrubidium <rubidium@openttd.org>2009-11-21 16:39:36 +0000
commita274cc6a606c65003a59650182fc31803cfae07b (patch)
tree95231b100738b04f4edf1f91a106746ddb2e90ef
parent5c6cf4f8d25d5953282437d22c5564c3a5ca587b (diff)
downloadopenttd-a274cc6a606c65003a59650182fc31803cfae07b.tar.xz
(svn r18207) -Fix [FS#3324] (r11961): [NewGRF] When starting a new game the values of action D variable 13 were incorrect
-rw-r--r--src/genworld.cpp7
-rw-r--r--src/misc.cpp2
2 files changed, 4 insertions, 5 deletions
diff --git a/src/genworld.cpp b/src/genworld.cpp
index b0bdfe8d2..2bc8d97ff 100644
--- a/src/genworld.cpp
+++ b/src/genworld.cpp
@@ -283,18 +283,19 @@ void GenerateWorld(GenerateWorldMode mode, uint size_x, uint size_y, bool reset_
/* 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, reset_settings);
+ PrepareGenerateWorldProgress();
+
/* Load the right landscape stuff */
GfxLoadSprites();
LoadStringWidthTable();
- InitializeGame(_gw.size_x, _gw.size_y, false, reset_settings);
- PrepareGenerateWorldProgress();
-
/* Re-init the windowing system */
ResetWindowSystem();
/* Create toolbars */
SetupColoursAndInitialWindow();
+ SetObjectToPlace(SPR_CURSOR_ZZZ, PAL_NONE, HT_NONE, WC_MAIN_WINDOW, 0);
if (_gw.thread != NULL) {
_gw.thread->Join();
diff --git a/src/misc.cpp b/src/misc.cpp
index 34a2285f2..017913ed0 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -63,8 +63,6 @@ void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settin
AllocateMap(size_x, size_y);
- SetObjectToPlace(SPR_CURSOR_ZZZ, PAL_NONE, HT_NONE, WC_MAIN_WINDOW, 0);
-
_pause_mode = PM_UNPAUSED;
_fast_forward = 0;
_tick_counter = 0;