From 97aec235e7993513fd6e16409aa0da936fd5c497 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Wed, 21 Sep 2022 15:10:59 +0200 Subject: [PATCH] Fix #18053: Ride types without vehicles get all pieces disabled --- src/openrct2-ui/windows/RideConstruction.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index fb6b1a7168..017663fb68 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -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);