Skip over dummy/invalid orders in destination prediction and auto-separation
This commit is contained in:
@@ -677,7 +677,7 @@ CargoMaskedStationIDStack OrderList::GetNextStoppingStation(const Vehicle *v, Ca
|
||||
});
|
||||
if (invalid) return CargoMaskedStationIDStack(cargo_mask, INVALID_STATION);
|
||||
}
|
||||
} while (next->IsType(OT_GOTO_DEPOT) || next->IsType(OT_RELEASE_SLOT) || next->IsType(OT_COUNTER) || next->GetDestination() == v->last_station_visited);
|
||||
} while (next->IsType(OT_GOTO_DEPOT) || next->IsType(OT_RELEASE_SLOT) || next->IsType(OT_COUNTER) || next->IsType(OT_DUMMY) || next->GetDestination() == v->last_station_visited);
|
||||
|
||||
return CargoMaskedStationIDStack(cargo_mask, next->GetDestination());
|
||||
}
|
||||
@@ -3174,6 +3174,9 @@ VehicleOrderID AdvanceOrderIndexDeferred(const Vehicle *v, VehicleOrderID index)
|
||||
break;
|
||||
}
|
||||
|
||||
case OT_DUMMY:
|
||||
break;
|
||||
|
||||
default:
|
||||
return index;
|
||||
}
|
||||
@@ -3336,6 +3339,12 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool
|
||||
v->IncrementRealOrderIndex();
|
||||
break;
|
||||
|
||||
case OT_DUMMY:
|
||||
assert(!pbs_look_ahead);
|
||||
UpdateVehicleTimetable(v, true);
|
||||
v->IncrementRealOrderIndex();
|
||||
break;
|
||||
|
||||
default:
|
||||
v->SetDestTile(0);
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user