summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/order_cmd.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index 66b5bf25d..0cbb10b78 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -1865,6 +1865,13 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth)
v->cur_auto_order_index = v->cur_real_order_index = next_order;
v->UpdateRealOrderIndex();
v->current_order_time += v->GetOrder(v->cur_real_order_index)->travel_time;
+
+ /* Disable creation of automatic orders.
+ * When inserting them we do not know that we would have to make the conditional orders point to them. */
+ if (v->IsGroundVehicle()) {
+ uint16 &gv_flags = v->GetGroundVehicleFlags();
+ SetBit(gv_flags, GVF_SUPPRESS_AUTOMATIC_ORDERS);
+ }
} else {
UpdateVehicleTimetable(v, true);
v->IncrementRealOrderIndex();