(svn r16457) -Fix [FS#2925]: skipping a 'nearest depot order' because none could be found could cause multiple orders to get skipped
This commit is contained in:
@@ -1628,8 +1628,15 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (conditional_depth > v->GetNumOrders()) return false;
|
||||||
|
|
||||||
UpdateVehicleTimetable(v, true);
|
UpdateVehicleTimetable(v, true);
|
||||||
v->IncrementOrderIndex();
|
v->IncrementOrderIndex();
|
||||||
|
|
||||||
|
/* Get the current order */
|
||||||
|
const Order *order = v->GetOrder(v->cur_order_index);
|
||||||
|
v->current_order = *order;
|
||||||
|
return UpdateOrderDest(v, order, conditional_depth + 1);
|
||||||
}
|
}
|
||||||
} else if (v->type != VEH_AIRCRAFT) {
|
} else if (v->type != VEH_AIRCRAFT) {
|
||||||
v->dest_tile = Depot::Get(order->GetDestination())->xy;
|
v->dest_tile = Depot::Get(order->GetDestination())->xy;
|
||||||
|
Reference in New Issue
Block a user