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);
|
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());
|
return CargoMaskedStationIDStack(cargo_mask, next->GetDestination());
|
||||||
}
|
}
|
||||||
@@ -3174,6 +3174,9 @@ VehicleOrderID AdvanceOrderIndexDeferred(const Vehicle *v, VehicleOrderID index)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case OT_DUMMY:
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
@@ -3336,6 +3339,12 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool
|
|||||||
v->IncrementRealOrderIndex();
|
v->IncrementRealOrderIndex();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OT_DUMMY:
|
||||||
|
assert(!pbs_look_ahead);
|
||||||
|
UpdateVehicleTimetable(v, true);
|
||||||
|
v->IncrementRealOrderIndex();
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
v->SetDestTile(0);
|
v->SetDestTile(0);
|
||||||
return false;
|
return false;
|
||||||
|
@@ -707,8 +707,8 @@ std::vector<TimetableProgress> PopulateSeparationState(const Vehicle *v_start)
|
|||||||
// Do not try to separate vehicles on depot service or halt orders
|
// Do not try to separate vehicles on depot service or halt orders
|
||||||
separation_valid = false;
|
separation_valid = false;
|
||||||
}
|
}
|
||||||
if (order->IsType(OT_RELEASE_SLOT) || order->IsType(OT_COUNTER)) {
|
if (order->IsType(OT_RELEASE_SLOT) || order->IsType(OT_COUNTER) || order->IsType(OT_DUMMY)) {
|
||||||
// Do not try to separate vehicles on release slot or change counter orders
|
// Do not try to separate vehicles on release slot, change counter, or invalid orders
|
||||||
separation_valid = false;
|
separation_valid = false;
|
||||||
}
|
}
|
||||||
int order_ticks;
|
int order_ticks;
|
||||||
|
Reference in New Issue
Block a user