From 6baf4888392407fdd8f08b948fd6a4087ebd107b Mon Sep 17 00:00:00 2001 From: bjarni Date: Sun, 3 Sep 2006 11:49:38 +0000 Subject: (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 --- ship_cmd.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ship_cmd.c') 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) { -- cgit v1.2.3-70-g09d2