Fix bug in cloning of schedued dispatch order

This commit is contained in:
innocenat
2017-06-07 17:04:29 +07:00
parent bcbe74f339
commit 02b53a2f52

View File

@@ -1894,11 +1894,11 @@ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
} }
/* Copy over scheduled dispatch data */ /* Copy over scheduled dispatch data */
dst->orders.list->SetScheduledDispatchDuration(src->orders.list->GetScheduledDispatchDuration());
dst->orders.list->SetScheduledDispatchDelay(src->orders.list->GetScheduledDispatchDelay());
for (const auto& slot : src->orders.list->GetScheduledDispatch()) { for (const auto& slot : src->orders.list->GetScheduledDispatch()) {
dst->orders.list->AddScheduledDispatch(slot); dst->orders.list->AddScheduledDispatch(slot);
} }
dst->orders.list->SetScheduledDispatchDuration(src->orders.list->GetScheduledDispatchDuration());
dst->orders.list->SetScheduledDispatchDelay(src->orders.list->GetScheduledDispatchDelay());
{ {
Date start_date; Date start_date;
uint16 start_full_date_fract; uint16 start_full_date_fract;