summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2011-11-15 19:53:46 +0000
committermichi_cc <michi_cc@openttd.org>2011-11-15 19:53:46 +0000
commitd7d032f70a68d221e10859a61d1154e49c8866d2 (patch)
treec12477c11587ced48df1c76daee5e495859180b1 /src
parente97b747f5d5e80f4b5153e2c1244f6bfb1dc9625 (diff)
downloadopenttd-d7d032f70a68d221e10859a61d1154e49c8866d2.tar.xz
(svn r23231) -Fix: [NewGRF] Make train var 0xF3 consistent with TTDPatch.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_engine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp
index 69cbe4a56..5d01aae42 100644
--- a/src/newgrf_engine.cpp
+++ b/src/newgrf_engine.cpp
@@ -795,7 +795,7 @@ static uint32 VehicleGetVariable(Vehicle *v, const ResolverObject *object, byte
switch (variable - 0x80) {
case 0x62: return t->track;
case 0x66: return t->railtype;
- case 0x73: return t->gcache.cached_veh_length;
+ case 0x73: return 0x80 + VEHICLE_LENGTH - t->gcache.cached_veh_length;
case 0x74: return t->gcache.cached_power;
case 0x75: return GB(t->gcache.cached_power, 8, 24);
case 0x76: return GB(t->gcache.cached_power, 16, 16);