mirror of https://github.com/OpenTTD/OpenTTD
(svn r21737) -Fix (r1)[FS#4384-ish]: A loading order was also marked as 'not part of orders' when the order before the current order was deleted.
parent
4863d934af
commit
29a0dd65a9
|
@ -796,8 +796,6 @@ void DeleteOrder(Vehicle *v, VehicleOrderID sel_ord)
|
||||||
Vehicle *u = v->FirstShared();
|
Vehicle *u = v->FirstShared();
|
||||||
DeleteOrderWarnings(u);
|
DeleteOrderWarnings(u);
|
||||||
for (; u != NULL; u = u->NextShared()) {
|
for (; u != NULL; u = u->NextShared()) {
|
||||||
if (sel_ord < u->cur_order_index) u->cur_order_index--;
|
|
||||||
|
|
||||||
assert(v->orders.list == u->orders.list);
|
assert(v->orders.list == u->orders.list);
|
||||||
|
|
||||||
/* NON-stop flag is misused to see if a train is in a station that is
|
/* NON-stop flag is misused to see if a train is in a station that is
|
||||||
|
@ -809,6 +807,8 @@ void DeleteOrder(Vehicle *v, VehicleOrderID sel_ord)
|
||||||
if (u->current_order.GetLoadType() & OLFB_FULL_LOAD) u->current_order.SetLoadType(OLF_LOAD_IF_POSSIBLE);
|
if (u->current_order.GetLoadType() & OLFB_FULL_LOAD) u->current_order.SetLoadType(OLF_LOAD_IF_POSSIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sel_ord < u->cur_order_index) u->cur_order_index--;
|
||||||
|
|
||||||
/* Update any possible open window of the vehicle */
|
/* Update any possible open window of the vehicle */
|
||||||
InvalidateVehicleOrder(u, sel_ord | (INVALID_VEH_ORDER_ID << 8));
|
InvalidateVehicleOrder(u, sel_ord | (INVALID_VEH_ORDER_ID << 8));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue