1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 01:19:11 +00:00

(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:
rubidium
2009-05-28 21:12:54 +00:00
parent d7b0aa47c5
commit 62a2dff61e

View File

@@ -1628,8 +1628,15 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth)
}
}
} else {
if (conditional_depth > v->GetNumOrders()) return false;
UpdateVehicleTimetable(v, true);
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) {
v->dest_tile = Depot::Get(order->GetDestination())->xy;