(svn r24246) -Add [FS#5052-ish]: [NewGRF] Variable with the current max speed for vehicles.

This commit is contained in:
michi_cc
2012-05-14 19:56:49 +00:00
parent 833f9ed8c3
commit d561bfe4db
5 changed files with 14 additions and 0 deletions

View File

@@ -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();