summaryrefslogtreecommitdiff
path: root/newgrf.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-14 20:58:12 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-14 20:58:12 +0000
commitfeed914b97f324929f7f3d832eec8550bd362741 (patch)
tree8260a44cadafb1c8be32e224224c0ca1a2615f04 /newgrf.c
parent90af6ee14ff8812f28d5e3667217d17e18aa9407 (diff)
downloadopenttd-feed914b97f324929f7f3d832eec8550bd362741.tar.xz
(svn r4869) - NewGRF: support setting train list vehicle width to 32 instead of 29 pixels, for sets which use 32 pixel long engines/wagons.
Diffstat (limited to 'newgrf.c')
-rw-r--r--newgrf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/newgrf.c b/newgrf.c
index 8f26af7d6..f304ba60f 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -2457,6 +2457,8 @@ static void ParamSet(byte *buf, int len)
case 0x9E: /* Miscellaneous GRF features */
_misc_grf_features = res;
+ /* Set train list engine width */
+ _traininfo_vehicle_width = HASBIT(res, 3) ? 32 : 29;
break;
default:
@@ -2648,6 +2650,11 @@ static void ResetNewGRFData(void)
// Add engine type to engine data. This is needed for the refit precalculation.
AddTypeToEngines();
+ /* Reset misc GRF features and train list display variables */
+ _misc_grf_features = 0;
+ _traininfo_vehicle_pitch = 0;
+ _traininfo_vehicle_width = 29;
+
InitializeSpriteGroupPool();
}