Skip over dummy/invalid orders in destination prediction and auto-separation

pull/507/head
Jonathan G Rennison 1 year ago
parent 3d1b0af8f6
commit e3e743ba1e

@ -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;

@ -707,8 +707,8 @@ std::vector<TimetableProgress> PopulateSeparationState(const Vehicle *v_start)
// Do not try to separate vehicles on depot service or halt orders
separation_valid = false;
}
if (order->IsType(OT_RELEASE_SLOT) || order->IsType(OT_COUNTER)) {
// Do not try to separate vehicles on release slot or change counter orders
if (order->IsType(OT_RELEASE_SLOT) || order->IsType(OT_COUNTER) || order->IsType(OT_DUMMY)) {
// Do not try to separate vehicles on release slot, change counter, or invalid orders
separation_valid = false;
}
int order_ticks;

Loading…
Cancel
Save