Fix go to nearest depot and halt orders, not halting.
This commit is contained in:
@@ -454,7 +454,7 @@ const Order *OrderList::GetNextDecisionNode(const Order *next, uint hops, uint32
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (next->IsType(OT_GOTO_DEPOT)) {
|
if (next->IsType(OT_GOTO_DEPOT)) {
|
||||||
if (next->GetDepotActionType() == ODATFB_HALT) return NULL;
|
if (next->GetDepotActionType() & ODATFB_HALT) return NULL;
|
||||||
if (next->IsRefit()) return next;
|
if (next->IsRefit()) return next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1901,7 +1901,7 @@ void VehicleEnterDepot(Vehicle *v)
|
|||||||
if (v->current_order.GetDepotOrderType() & ODTFB_PART_OF_ORDERS) {
|
if (v->current_order.GetDepotOrderType() & ODTFB_PART_OF_ORDERS) {
|
||||||
v->DeleteUnreachedImplicitOrders();
|
v->DeleteUnreachedImplicitOrders();
|
||||||
UpdateVehicleTimetable(v, true);
|
UpdateVehicleTimetable(v, true);
|
||||||
if (v->current_order.IsWaitTimetabled()) {
|
if (v->current_order.IsWaitTimetabled() && !(v->current_order.GetDepotActionType() & ODATFB_HALT)) {
|
||||||
v->current_order.MakeWaiting();
|
v->current_order.MakeWaiting();
|
||||||
v->current_order.SetNonStopType(ONSF_NO_STOP_AT_ANY_STATION);
|
v->current_order.SetNonStopType(ONSF_NO_STOP_AT_ANY_STATION);
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user