1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 00:04:43 +01:00

Fix #18053: Ride types without vehicles get all pieces disabled

This commit is contained in:
Gymnasiast
2022-09-21 15:10:59 +02:00
parent 0687e4f393
commit 97aec235e7

View File

@@ -2723,6 +2723,12 @@ static void WindowRideConstructionUpdateDisabledPieces(ObjectEntryIndex rideType
auto& objManager = OpenRCT2::GetContext()->GetObjectManager();
auto& rideEntries = objManager.GetAllRideEntries(rideType);
// If there are no vehicles for this ride type, enable all the track pieces.
if (rideEntries.size() == 0)
{
disabledPieces.reset();
}
for (auto rideEntryIndex : rideEntries)
{
const auto* currentRideEntry = get_ride_entry(rideEntryIndex);