summaryrefslogtreecommitdiff
path: root/order_cmd.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-01-15 09:28:08 +0000
committercelestar <celestar@openttd.org>2005-01-15 09:28:08 +0000
commit02ed8410a24c1bb1619f0e13a97bd78265355cbd (patch)
treec6a836c94525b32278cec41cf3492cfdb6d8c481 /order_cmd.c
parent3279a7c9a26242f5f0a8e4b41ae6e2d9e24ee169 (diff)
downloadopenttd-02ed8410a24c1bb1619f0e13a97bd78265355cbd.tar.xz
(svn r1521) -Fix: Ship Vehicle Lists are now redrawn correctly
-Codechange: added some const to last commit -Codechange: Ship and Aircraft lists are now update on order change, not on new day
Diffstat (limited to 'order_cmd.c')
-rw-r--r--order_cmd.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/order_cmd.c b/order_cmd.c
index d7a7abb3c..7332b0513 100644
--- a/order_cmd.c
+++ b/order_cmd.c
@@ -140,9 +140,9 @@ int32 CmdDeleteOrder(int x, int y, uint32 flags, uint32 p1, uint32 p2)
/* p1 = vehicle */
int32 CmdSkipOrder(int x, int y, uint32 flags, uint32 p1, uint32 p2)
{
- if (flags & DC_EXEC) {
- Vehicle *v = GetVehicle(p1);
+ Vehicle *v = GetVehicle(p1);
+ if (flags & DC_EXEC) {
{
byte b = v->cur_order_index + 1;
if (b >= v->num_orders) b = 0;
@@ -159,6 +159,13 @@ int32 CmdSkipOrder(int x, int y, uint32 flags, uint32 p1, uint32 p2)
InvalidateWindow(WC_VEHICLE_ORDERS, v->index);
}
+
+ //we have an aircraft, they have a mini-schedule, so update them all
+ if (v->type == VEH_Aircraft) InvalidateAircraftWindows(v);
+
+ //same goes for ships
+ if (v->type == VEH_Ship) InvalidateShipWindows(v);
+
return 0;
}