File diff r2213:6582b22231a1 → r2214:59bf23688ead
roadveh_cmd.c
Show inline comments
 
@@ -621,25 +621,25 @@ static void ProcessRoadVehOrder(Vehicle 
 
{
 
	const Order *order;
 
	const Station *st;
 

	
 
	if (v->current_order.type >= OT_GOTO_DEPOT && v->current_order.type <= OT_LEAVESTATION) {
 
		// Let a depot order in the orderlist interrupt.
 
		if (v->current_order.type != OT_GOTO_DEPOT ||
 
				!(v->current_order.flags & OF_UNLOAD))
 
			return;
 
	}
 

	
 
	if (v->current_order.type == OT_GOTO_DEPOT &&
 
			(v->current_order.flags & (OF_UNLOAD | OF_FULL_LOAD)) == (OF_UNLOAD | OF_FULL_LOAD) &&
 
			(v->current_order.flags & (OF_PART_OF_ORDERS | OF_SERVICE_IF_NEEDED)) == (OF_PART_OF_ORDERS | OF_SERVICE_IF_NEEDED) &&
 
			!VehicleNeedsService(v)) {
 
		v->cur_order_index++;
 
	}
 

	
 
	if (v->cur_order_index >= v->num_orders)
 
		v->cur_order_index = 0;
 

	
 
	order = GetVehicleOrder(v, v->cur_order_index);
 

	
 
	if (order == NULL) {
 
		v->current_order.type = OT_NOTHING;
 
		v->current_order.flags = 0;