Fix go to nearest depot and halt orders, not halting.

This commit is contained in:
Jonathan G Rennison
2017-01-11 23:49:23 +00:00
parent 6e829c39e4
commit c600ffe6d5
2 changed files with 2 additions and 2 deletions

View File

@@ -454,7 +454,7 @@ const Order *OrderList::GetNextDecisionNode(const Order *next, uint hops, uint32
}
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;
}

View File

@@ -1901,7 +1901,7 @@ void VehicleEnterDepot(Vehicle *v)
if (v->current_order.GetDepotOrderType() & ODTFB_PART_OF_ORDERS) {
v->DeleteUnreachedImplicitOrders();
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.SetNonStopType(ONSF_NO_STOP_AT_ANY_STATION);
return;