summaryrefslogtreecommitdiff
path: root/src/ship.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ship.h')
-rw-r--r--src/ship.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ship.h b/src/ship.h
index 1c6749576..ca4cefa6d 100644
--- a/src/ship.h
+++ b/src/ship.h
@@ -35,7 +35,7 @@ struct Ship: public SpecializedVehicle<Ship, VEH_SHIP> {
bool IsPrimaryVehicle() const { return true; }
SpriteID GetImage(Direction direction) const;
int GetDisplaySpeed() const { return this->cur_speed / 2; }
- int GetDisplayMaxSpeed() const { return this->max_speed / 2; }
+ int GetDisplayMaxSpeed() const { return this->vcache.cached_max_speed / 2; }
Money GetRunningCost() const;
bool IsInDepot() const { return this->state == TRACK_BIT_DEPOT; }
bool Tick();
@@ -43,6 +43,7 @@ struct Ship: public SpecializedVehicle<Ship, VEH_SHIP> {
Trackdir GetVehicleTrackdir() const;
TileIndex GetOrderStationLocation(StationID station);
bool FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse);
+ void UpdateCache();
};
#define FOR_ALL_SHIPS(var) FOR_ALL_VEHICLES_OF_TYPE(Ship, var)