summaryrefslogtreecommitdiff
path: root/src/roadveh.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-12-18 21:34:06 +0000
committerrubidium <rubidium@openttd.org>2009-12-18 21:34:06 +0000
commit6f1982d15149a3649a6ae7f24caaeace8d3809d9 (patch)
treef8e5974c2983ba20abaa8706b31247dd2c5eace8 /src/roadveh.h
parent6f5425a062db70049c7be823004393c88ec714eb (diff)
downloadopenttd-6f1982d15149a3649a6ae7f24caaeace8d3809d9.tar.xz
(svn r18531) -Fix [FS#3384] (r18404): for articulated road vehicles only the first part was accounted for, so for extremely short fronts and lots after it the spreading did not work as it should.
Diffstat (limited to 'src/roadveh.h')
-rw-r--r--src/roadveh.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/roadveh.h b/src/roadveh.h
index 21a40596b..2ff51de5c 100644
--- a/src/roadveh.h
+++ b/src/roadveh.h
@@ -85,8 +85,9 @@ void RoadVehUpdateCache(RoadVehicle *v);
/** Cached oftenly queried (NewGRF) values */
struct RoadVehicleCache {
- byte cached_veh_length;
- EngineID first_engine; ///< cached EngineID of the front vehicle. INVALID_ENGINE for the front vehicle itself.
+ uint16 cached_total_length; ///< Length of the whole train, valid only for first engine.
+ byte cached_veh_length; ///< length of this vehicle in units of 1/8 of normal length, cached because this can be set by a callback
+ EngineID first_engine; ///< Cached EngineID of the front vehicle. INVALID_ENGINE for the front vehicle itself.
};
/**