Changeset - r7532:8a3e147f8752
[Not reviewed]
master
0 1 0
glx - 17 years ago 2007-09-07 17:01:35
glx@openttd.org
(svn r11052) -Fix (r11017)[FS#1210]: vehicles always skip service order
1 file changed with 5 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -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 */
0 comments (0 inline, 0 general)