summaryrefslogtreecommitdiff
path: root/genworld.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 /genworld.c
parent32db875d978fd59c6dc941c61d331d4a1b20a24a (diff)
downloadopenttd-64bf2432bbf643bb36e46c6668f6b7d880c3f989.tar.xz
(svn r7506) -Codechange: [NewGRF] Add action 7/9/D variable 0x81 (current year)
Diffstat (limited to 'genworld.c')
-rw-r--r--genworld.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/genworld.c b/genworld.c
index 9872270b0..70bb983c6 100644
--- a/genworld.c
+++ b/genworld.c
@@ -15,6 +15,7 @@
#include "debug.h"
#include "settings.h"
#include "heightmap.h"
+#include "date.h"
void GenerateLandscape(byte mode);
void GenerateClearTile(void);
@@ -252,11 +253,14 @@ void GenerateWorld(int mode, uint size_x, uint size_y)
/* Make sure everything is done via OWNER_NONE */
_current_player = OWNER_NONE;
+ /* Set the date before loading sprites as some newgrfs check it */
+ SetDate(ConvertYMDToDate(_patches.starting_year, 0, 1));
+
/* Load the right landscape stuff */
GfxLoadSprites();
LoadStringWidthTable();
- InitializeGame(IG_DATE_RESET, _gw.size_x, _gw.size_y);
+ InitializeGame(IG_NONE, _gw.size_x, _gw.size_y);
PrepareGenerateWorldProgress();
/* Re-init the windowing system */