diff options
author | glx <glx@openttd.org> | 2007-09-07 17:01:35 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2007-09-07 17:01:35 +0000 |
commit | 5ad79a5db0de1eac743c3f5098a7ab73f3474a43 (patch) | |
tree | 83989749b662ce0506516e7ed9b78f2a91a193d7 /src | |
parent | 71a23846d3a7375e4292a5f80e8ccee5a04b4065 (diff) | |
download | openttd-5ad79a5db0de1eac743c3f5098a7ab73f3474a43.tar.xz |
(svn r11052) -Fix (r11017)[FS#1210]: vehicles always skip service order
Diffstat (limited to 'src')
-rw-r--r-- | src/vehicle.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 44abc9f98..85ddcd377 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -92,9 +92,11 @@ void VehicleServiceInDepot(Vehicle *v) bool VehicleNeedsService(const Vehicle *v) { if (v->vehstatus & (VS_STOPPED | VS_CRASHED)) return false; - if (_patches.gotodepot && VehicleHasDepotOrders(v)) return false; - if (v->current_order.type == OT_LOADING) return false; - if (v->current_order.type == OT_GOTO_DEPOT && v->current_order.flags & OF_HALT_IN_DEPOT) return false; + if (v->current_order.type != OT_GOTO_DEPOT || !(v->current_order.flags & OF_PART_OF_ORDERS)) { // Don't interfere with a depot visit by the order list + if (_patches.gotodepot && VehicleHasDepotOrders(v)) return false; + if (v->current_order.type == OT_LOADING) return false; + if (v->current_order.type == OT_GOTO_DEPOT && v->current_order.flags & OF_HALT_IN_DEPOT) return false; + } if (_patches.no_servicing_if_no_breakdowns && _opt.diff.vehicle_breakdowns == 0) { return EngineHasReplacementForPlayer(GetPlayer(v->owner), v->engine_type, v->group_id); /* Vehicles set for autoreplacing needs to go to a depot even if breakdowns are turned off */ |