summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-05-06 09:12:58 +0000
committermaedhros <maedhros@openttd.org>2007-05-06 09:12:58 +0000
commitb219b7b53a764350f30f38bbd6dff733d25284fc (patch)
tree9bf42540c4791f0182e7ca9ef795e443270ab587 /src/newgrf.cpp
parent755f2327d33a64e5195a7fa478fd0d49ad342782 (diff)
downloadopenttd-b219b7b53a764350f30f38bbd6dff733d25284fc.tar.xz
(svn r9793) -Fix (r9701): Action D 'TTDPatch variable' 0x0B should be the starting year, not the current year.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 2bc557106..88ebbd3fc 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -3463,7 +3463,7 @@ static uint32 GetPatchVariable(uint8 param)
{
switch (param) {
/* start year - 1920 */
- case 0x0B: return _cur_year - ORIGINAL_BASE_YEAR;
+ case 0x0B: return max(_patches.starting_year, ORIGINAL_BASE_YEAR) - ORIGINAL_BASE_YEAR;
/* freight trains weight factor */
case 0x0E: return _patches.freight_trains;
/* empty wagon speed increase */