Fix duplicate order duplicating dispatch schedule assignment

This commit is contained in:
Jonathan G Rennison
2024-06-28 21:41:07 +01:00
parent 6b30ab5c2c
commit 14e0468504

View File

@@ -1065,6 +1065,7 @@ CommandCost CmdDuplicateOrder(TileIndex tile, DoCommandFlag flags, uint32_t p1,
new_order.SetTravelTimetabled(false); new_order.SetTravelTimetabled(false);
new_order.SetTravelTime(0); new_order.SetTravelTime(0);
new_order.SetTravelFixed(false); new_order.SetTravelFixed(false);
new_order.SetDispatchScheduleIndex(-1);
CommandCost cost = CmdInsertOrderIntl(flags, v, sel_ord + 1, new_order, true); CommandCost cost = CmdInsertOrderIntl(flags, v, sel_ord + 1, new_order, true);
if (cost.Failed()) return cost; if (cost.Failed()) return cost;
if (flags & DC_EXEC) { if (flags & DC_EXEC) {