From f713a3525d32df403e080f1d5734fe5f159ee662 Mon Sep 17 00:00:00 2001 From: Juanjo Date: Fri, 27 Dec 2013 18:50:44 +0000 Subject: [PATCH] Change: Adapt IsInDepot() for ships. --- src/ship.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ship.h b/src/ship.h index c47be05436..927dc171ef 100644 --- a/src/ship.h +++ b/src/ship.h @@ -43,7 +43,7 @@ struct Ship final : public SpecializedVehicle { int GetDisplayMaxSpeed() const override { return this->vcache.cached_max_speed / 2; } int GetCurrentMaxSpeed() const override { return std::min(this->vcache.cached_max_speed, this->current_order.GetMaxSpeed() * 2); } Money GetRunningCost() const override; - bool IsInDepot() const override { return this->state == TRACK_BIT_DEPOT; } + bool IsInDepot() const override { return HasBit((uint8_t)this->state, TRACK_DEPOT); } bool Tick() override; void OnNewCalendarDay() override; void OnNewEconomyDay() override;