mirror of https://github.com/OpenTTD/OpenTTD
(svn r21809) -Fix [FS#4404]: remove unreached automatic orders as well when reaching an ordered waypoint or depot (fonsinchen)
parent
4784c3ac3c
commit
bd9f07e5a0
|
@ -1733,6 +1733,7 @@ bool ProcessOrders(Vehicle *v)
|
||||||
if (((v->current_order.IsType(OT_GOTO_STATION) && (v->current_order.GetNonStopType() & ONSF_NO_STOP_AT_DESTINATION_STATION)) || v->current_order.IsType(OT_GOTO_WAYPOINT)) &&
|
if (((v->current_order.IsType(OT_GOTO_STATION) && (v->current_order.GetNonStopType() & ONSF_NO_STOP_AT_DESTINATION_STATION)) || v->current_order.IsType(OT_GOTO_WAYPOINT)) &&
|
||||||
IsTileType(v->tile, MP_STATION) &&
|
IsTileType(v->tile, MP_STATION) &&
|
||||||
v->current_order.GetDestination() == GetStationIndex(v->tile)) {
|
v->current_order.GetDestination() == GetStationIndex(v->tile)) {
|
||||||
|
v->DeleteUnreachedAutoOrders();
|
||||||
/* We set the last visited station here because we do not want
|
/* We set the last visited station here because we do not want
|
||||||
* the train to stop at this 'via' station if the next order
|
* the train to stop at this 'via' station if the next order
|
||||||
* is a no-non-stop order; in that case not setting the last
|
* is a no-non-stop order; in that case not setting the last
|
||||||
|
|
|
@ -1265,6 +1265,7 @@ void VehicleEnterDepot(Vehicle *v)
|
||||||
|
|
||||||
if (t.GetDepotOrderType() & ODTFB_PART_OF_ORDERS) {
|
if (t.GetDepotOrderType() & ODTFB_PART_OF_ORDERS) {
|
||||||
/* Part of orders */
|
/* Part of orders */
|
||||||
|
v->DeleteUnreachedAutoOrders();
|
||||||
UpdateVehicleTimetable(v, true);
|
UpdateVehicleTimetable(v, true);
|
||||||
v->IncrementOrderIndex();
|
v->IncrementOrderIndex();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue