diff options
author | terkhen <terkhen@openttd.org> | 2010-11-06 12:53:31 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-11-06 12:53:31 +0000 |
commit | c8a56f17f82be7d4a8e935fc514c86a313dc7d15 (patch) | |
tree | 4a2552f26ee887aa326721881fbbe6f62b8b48d2 /src/train.h | |
parent | 78d0a1cb1af68863e3e7bfed584f4a94ee46f611 (diff) | |
download | openttd-c8a56f17f82be7d4a8e935fc514c86a313dc7d15.tar.xz |
(svn r21097) -Codechange: Unify cached max speed for all vehicle types.
Diffstat (limited to 'src/train.h')
-rw-r--r-- | src/train.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/train.h b/src/train.h index c1dd3af24..b334c0b92 100644 --- a/src/train.h +++ b/src/train.h @@ -76,7 +76,6 @@ struct TrainCache { bool cached_tilt; ///< train can tilt; feature provides a bonus in curves /* cached max. speed / acceleration data */ - uint16 cached_max_speed; ///< max speed of the consist. (minimum of the max speed of all vehicles in the consist) int cached_max_curve_speed; ///< max consist speed limited by curves /** @@ -127,7 +126,7 @@ struct Train : public GroundVehicle<Train, VEH_TRAIN> { bool IsPrimaryVehicle() const { return this->IsFrontEngine(); } SpriteID GetImage(Direction direction) const; int GetDisplaySpeed() const { return this->tcache.last_speed; } - int GetDisplayMaxSpeed() const { return this->tcache.cached_max_speed; } + int GetDisplayMaxSpeed() const { return this->vcache.cached_max_speed; } Money GetRunningCost() const; int GetDisplayImageWidth(Point *offset = NULL) const; bool IsInDepot() const; |