Exclude waypoint orders from set timetabled wait time for all orders

See #125
This commit is contained in:
Jonathan G Rennison
2020-01-03 14:01:24 +00:00
parent c9a5b30d39
commit 7f2e6fb597

View File

@@ -298,6 +298,9 @@ CommandCost CmdBulkChangeTimetable(TileIndex tile, DoCommandFlag flags, uint32 p
Order *order = v->GetOrder(order_number);
if (order == nullptr || order->IsType(OT_IMPLICIT)) continue;
// Exclude waypoints from set all wait times command
if (Extract<ModifyTimetableFlags, 28, 3>(p1) == MTF_WAIT_TIME && GB(p1, 31, 1) == 0 && order->IsType(OT_GOTO_WAYPOINT)) continue;
uint32 new_p1 = p1;
SB(new_p1, 20, 8, order_number);
DoCommand(tile, new_p1, p2, flags, CMD_CHANGE_TIMETABLE);