forked from mirror/OpenTTD
(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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user