(svn r6013) -Fix: some newgrf properties returned the date in the new format where the newgrf's expect the original format. Thanks to michi_cc for finding these and providing the initial patch.

This commit is contained in:
rubidium
2006-08-20 20:21:00 +00:00
parent b1e2ae44d6
commit 2d30e02ba2
3 changed files with 6 additions and 6 deletions

View File

@@ -75,7 +75,7 @@ static inline uint32 GetVariable(const ResolverObject *object, byte variable, by
{
/* Return common variables */
switch (variable) {
case 0x00: return _date;
case 0x00: return max(_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0);
case 0x01: return clamp(_cur_year, ORIGINAL_BASE_YEAR, ORIGINAL_MAX_YEAR) - ORIGINAL_BASE_YEAR;
case 0x02: return _cur_month;
case 0x03: return _opt.landscape;