order_cmd.c
changeset 1020 1223cd937174
parent 919 b0d6c7642f99
child 1024 9b06b01490a4
--- a/order_cmd.c	Sat Jan 15 08:58:31 2005 +0000
+++ b/order_cmd.c	Sat Jan 15 09:28:08 2005 +0000
@@ -140,9 +140,9 @@
 /* p1 = vehicle */
 int32 CmdSkipOrder(int x, int y, uint32 flags, uint32 p1, uint32 p2)
 {
+	Vehicle *v = GetVehicle(p1);
+
 	if (flags & DC_EXEC) {
-		Vehicle *v = GetVehicle(p1);
-
 		{
 			byte b = v->cur_order_index + 1;
 			if (b >= v->num_orders) b = 0;
@@ -159,6 +159,13 @@
 
 		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;
 }