summaryrefslogtreecommitdiff
path: root/ship_cmd.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-09-03 11:49:38 +0000
committerbjarni <bjarni@openttd.org>2006-09-03 11:49:38 +0000
commit6baf4888392407fdd8f08b948fd6a4087ebd107b (patch)
treecbbd6966c9d25e321e0ce148f06610e534e7422d /ship_cmd.c
parent23168f630952490f6a548f1889e1a3b035b29f1d (diff)
downloadopenttd-6baf4888392407fdd8f08b948fd6a4087ebd107b.tar.xz
(svn r6356) -Fix: FS#263 planes come out of hangar and drive back into hangar
Now all vehicles are serviced when it's time for service and they are in a depot This will avoid the goto depot order from ever showing up when in a depot
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) {