forked from mirror/OpenTTD
(svn r21911) -Codechange: move tcache.last_speed to gcache.last_speed and make SetLastSpeed a function of GroundVehicle
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user