(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
This commit is contained in:
bjarni
2006-09-03 11:49:38 +00:00
parent 23168f6309
commit 6baf488839
4 changed files with 34 additions and 2 deletions

View File

@@ -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) {