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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user