summaryrefslogtreecommitdiff
path: root/ship_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ship_cmd.c')
-rw-r--r--ship_cmd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ship_cmd.c b/ship_cmd.c
index 16d3fa623..d014ba485 100644
--- a/ship_cmd.c
+++ b/ship_cmd.c
@@ -112,6 +112,11 @@ static void CheckIfShipNeedsService(Vehicle *v)
if (_patches.gotodepot && VehicleHasDepotOrders(v)) return;
+ if (IsShipInDepot(v)) {
+ VehicleServiceInDepot(v);
+ return;
+ }
+
depot = FindClosestShipDepot(v);
if (depot == NULL || DistanceManhattan(v->tile, depot->xy) > 12) {