diff options
author | rubidium <rubidium@openttd.org> | 2008-04-09 17:48:22 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-04-09 17:48:22 +0000 |
commit | c93e1293cb2df96c52066d39b522c563dc5b2f60 (patch) | |
tree | f7755dae5eac93a44b37f4d9b2f580f7c49b5884 /src/order_cmd.cpp | |
parent | 3274ca604fdcb43444449e0bf36dd110137dead5 (diff) | |
download | openttd-c93e1293cb2df96c52066d39b522c563dc5b2f60.tar.xz |
(svn r12639) -Fix: order window was not marked dirty on changed orders.
Diffstat (limited to 'src/order_cmd.cpp')
-rw-r--r-- | src/order_cmd.cpp | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index d65631665..bbd1c01bd 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -810,24 +810,22 @@ CommandCost CmdModifyOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) /* Update the windows and full load flags, also for vehicles that share the same order list */ Vehicle *u = GetFirstVehicleFromSharedList(v); DeleteOrderWarnings(u); - if (mof == MOF_LOAD || mof == MOF_UNLOAD) { - for (; u != NULL; u = u->next_shared) { - /* Toggle u->current_order "Full load" flag if it changed. - * However, as the same flag is used for depot orders, check - * whether we are not going to a depot as there are three - * cases where the full load flag can be active and only - * one case where the flag is used for depot orders. In the - * other cases for the OrderTypeByte the flags are not used, - * so do not care and those orders should not be active - * when this function is called. - */ - if (sel_ord == u->cur_order_index && - (u->current_order.IsType(OT_GOTO_STATION) || u->current_order.IsType(OT_LOADING)) && - u->current_order.GetLoadType() != order->GetLoadType()) { - u->current_order.SetLoadType(order->GetLoadType()); - } - InvalidateVehicleOrder(u); + for (; u != NULL; u = u->next_shared) { + /* Toggle u->current_order "Full load" flag if it changed. + * However, as the same flag is used for depot orders, check + * whether we are not going to a depot as there are three + * cases where the full load flag can be active and only + * one case where the flag is used for depot orders. In the + * other cases for the OrderTypeByte the flags are not used, + * so do not care and those orders should not be active + * when this function is called. + */ + if (sel_ord == u->cur_order_index && + (u->current_order.IsType(OT_GOTO_STATION) || u->current_order.IsType(OT_LOADING)) && + u->current_order.GetLoadType() != order->GetLoadType()) { + u->current_order.SetLoadType(order->GetLoadType()); } + InvalidateVehicleOrder(u); } } |