From b11f1bd4ed68fc0d031429df2925b87ed6baceb3 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 26 Jan 2011 17:31:07 +0000 Subject: (svn r21911) -Codechange: move tcache.last_speed to gcache.last_speed and make SetLastSpeed a function of GroundVehicle --- src/train.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/train.h') 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 { 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; -- cgit v1.2.3-70-g09d2