(svn r25562) -Fix [FS#5633]: If the next order cannot be resolved, reset the current order property instead of leaving it in an intermediate state.

pull/155/head
frosch 11 years ago
parent 3adb7e449a
commit c9c2ce3f25

@ -2025,7 +2025,11 @@ VehicleOrderID ProcessConditionalOrder(const Order *order, const Vehicle *v)
*/
bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool pbs_look_ahead)
{
if (conditional_depth > v->GetNumOrders()) return false;
if (conditional_depth > v->GetNumOrders()) {
v->current_order.Free();
v->dest_tile = 0;
return false;
}
switch (order->GetType()) {
case OT_GOTO_STATION:

Loading…
Cancel
Save