diff options
author | bjarni <bjarni@openttd.org> | 2006-09-03 11:49:38 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2006-09-03 11:49:38 +0000 |
commit | 6baf4888392407fdd8f08b948fd6a4087ebd107b (patch) | |
tree | cbbd6966c9d25e321e0ce148f06610e534e7422d /aircraft_cmd.c | |
parent | 23168f630952490f6a548f1889e1a3b035b29f1d (diff) | |
download | openttd-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 'aircraft_cmd.c')
-rw-r--r-- | aircraft_cmd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/aircraft_cmd.c b/aircraft_cmd.c index d87b931da..bb5985f92 100644 --- a/aircraft_cmd.c +++ b/aircraft_cmd.c @@ -667,6 +667,11 @@ static void CheckIfAircraftNeedsService(Vehicle *v) if (_patches.gotodepot && VehicleHasDepotOrders(v)) return; + if (IsAircraftInHangar(v)) { + VehicleServiceInDepot(v); + return; + } + st = GetStation(v->current_order.dest); // only goto depot if the target airport has terminals (eg. it is airport) if (IsValidStation(st) && st->airport_tile != 0 && GetAirport(st->airport_type)->terminals != NULL) { |