Add company setting for remain at station if next order for same station

Set value on load for whether the save version had this enabled for trains
This commit is contained in:
Jonathan G Rennison
2023-04-06 01:14:02 +01:00
parent 1d05637d45
commit c9c0436e58
11 changed files with 29 additions and 4 deletions

View File

@@ -1580,7 +1580,7 @@ inline byte IncreaseOvertakingCounter(RoadVehicle *v)
static bool CheckRestartLoadingAtRoadStop(RoadVehicle *v)
{
if (v->GetNumOrders() < 1) return false;
if (v->GetNumOrders() < 1 || !Company::Get(v->owner)->settings.remain_if_next_order_same_station) return false;
StationID station_id = v->current_order.GetDestination();
VehicleOrderID next_order_idx = AdvanceOrderIndexDeferred(v, v->cur_implicit_order_index);