summaryrefslogtreecommitdiff
path: root/openttd.c
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2006-12-18 15:34:12 +0000
committerglx <glx@openttd.org>2006-12-18 15:34:12 +0000
commit64bf2432bbf643bb36e46c6668f6b7d880c3f989 (patch)
tree3054f7ea9cecf4bfccf3102ccf24bef93ed836da /openttd.c
parent32db875d978fd59c6dc941c61d331d4a1b20a24a (diff)
downloadopenttd-64bf2432bbf643bb36e46c6668f6b7d880c3f989.tar.xz
(svn r7506) -Codechange: [NewGRF] Add action 7/9/D variable 0x81 (current year)
Diffstat (limited to 'openttd.c')
-rw-r--r--openttd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/openttd.c b/openttd.c
index 2cb3b7c1e..d91061395 100644
--- a/openttd.c
+++ b/openttd.c
@@ -1164,6 +1164,10 @@ bool AfterLoadGame(void)
/* Check all NewGRFs are present */
if (!IsGoodGRFConfigList()) return false;
+ /* Update current year
+ * must be done before loading sprites as some newgrfs check it */
+ SetDate(_date);
+
// Load the sprites
GfxLoadSprites();
LoadStringWidthTable();
@@ -1175,9 +1179,6 @@ bool AfterLoadGame(void)
/* Connect front and rear engines of multiheaded trains */
ConnectMultiheadedTrains();
- // Update current year
- SetDate(_date);
-
// reinit the landscape variables (landscape might have changed)
InitializeLandscapeVariables(true);