summaryrefslogtreecommitdiff
path: root/src/train.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-01-26 17:31:07 +0000
committerrubidium <rubidium@openttd.org>2011-01-26 17:31:07 +0000
commitb11f1bd4ed68fc0d031429df2925b87ed6baceb3 (patch)
tree5bb149c0bafdbb9a3987237fa5f1d659f92268cf /src/train.h
parent12b64a12b06f93d81a433cb311dfd1228d155e98 (diff)
downloadopenttd-b11f1bd4ed68fc0d031429df2925b87ed6baceb3.tar.xz
(svn r21911) -Codechange: move tcache.last_speed to gcache.last_speed and make SetLastSpeed a function of GroundVehicle
Diffstat (limited to 'src/train.h')
-rw-r--r--src/train.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/train.h b/src/train.h
index f7142e47a..1d153337c 100644
--- a/src/train.h
+++ b/src/train.h
@@ -65,8 +65,6 @@ struct TrainCache {
/* Cached wagon override spritegroup */
const struct SpriteGroup *cached_override;
- uint16 last_speed; // NOSAVE: only used in UI
-
/* cached values, recalculated on load and each time a vehicle is added to/removed from the consist. */
bool cached_tilt; ///< train can tilt; feature provides a bonus in curves
@@ -110,7 +108,7 @@ struct Train : public GroundVehicle<Train, VEH_TRAIN> {
void PlayLeaveStationSound() const;
bool IsPrimaryVehicle() const { return this->IsFrontEngine(); }
SpriteID GetImage(Direction direction) const;
- int GetDisplaySpeed() const { return this->tcache.last_speed; }
+ int GetDisplaySpeed() const { return this->gcache.last_speed; }
int GetDisplayMaxSpeed() const { return this->vcache.cached_max_speed; }
Money GetRunningCost() const;
int GetDisplayImageWidth(Point *offset = NULL) const;