(svn r9793) -Fix (r9701): Action D 'TTDPatch variable' 0x0B should be the starting year, not the current year.
authormaedhros
Sun, 06 May 2007 09:12:58 +0000
changeset 6579 3b1c0599dace
parent 6578 acb703c8e52c
child 6580 8ba94d9af221
(svn r9793) -Fix (r9701): Action D 'TTDPatch variable' 0x0B should be the starting year, not the current year.
src/newgrf.cpp
--- a/src/newgrf.cpp	Sun May 06 08:50:03 2007 +0000
+++ b/src/newgrf.cpp	Sun May 06 09:12:58 2007 +0000
@@ -3463,7 +3463,7 @@
 {
 	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 */