From 840f836704aceaae8e1bd2d3b671baf92887f84c Mon Sep 17 00:00:00 2001 From: frosch Date: Fri, 5 Jul 2013 19:09:18 +0000 Subject: (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. --- src/order_cmd.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index 71edbb406..419d09691 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -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: -- cgit v1.2.3-70-g09d2