summaryrefslogtreecommitdiff
path: root/src/ship.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ship.h')
-rw-r--r--src/ship.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ship.h b/src/ship.h
index 6096ae055..e471e7fb1 100644
--- a/src/ship.h
+++ b/src/ship.h
@@ -37,6 +37,7 @@ struct Ship FINAL : public SpecializedVehicle<Ship, VEH_SHIP> {
SpriteID GetImage(Direction direction, EngineImageType image_type) const;
int GetDisplaySpeed() const { return this->cur_speed / 2; }
int GetDisplayMaxSpeed() const { return this->vcache.cached_max_speed / 2; }
+ int GetCurrentMaxSpeed() const { return min(this->vcache.cached_max_speed, this->current_order.max_speed * 2); }
Money GetRunningCost() const;
bool IsInDepot() const { return this->state == TRACK_BIT_DEPOT; }
bool Tick();