From 4093480f83e6ed95e39004722f659aee6780bcf3 Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Thu, 22 Aug 2019 23:08:11 +0200 Subject: [PATCH] Fix #9909: 'Build 10 roller coasters' objectives do not complete (#9922) --- src/openrct2/scenario/Scenario.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2/scenario/Scenario.cpp b/src/openrct2/scenario/Scenario.cpp index 96f229f61b..412d18e9b0 100644 --- a/src/openrct2/scenario/Scenario.cpp +++ b/src/openrct2/scenario/Scenario.cpp @@ -748,10 +748,10 @@ static void scenario_objective_check_park_value_by() static void scenario_objective_check_10_rollercoasters() { auto rcs = 0; - std::bitset type_already_counted; + std::bitset type_already_counted; for (const auto& ride : GetRideManager()) { - if (ride.status == RIDE_STATUS_OPEN && ride.excitement >= RIDE_RATING(6, 00) && ride.subtype < RIDE_TYPE_COUNT) + if (ride.status == RIDE_STATUS_OPEN && ride.excitement >= RIDE_RATING(6, 00) && ride.subtype != RIDE_ENTRY_INDEX_NULL) { auto rideEntry = ride.GetRideEntry(); if (rideEntry != nullptr) @@ -842,11 +842,11 @@ static void scenario_objective_check_monthly_ride_income() static void scenario_objective_check_10_rollercoasters_length() { const auto objective_length = gScenarioObjectiveNumGuests; - std::bitset type_already_counted; + std::bitset type_already_counted; auto rcs = 0; for (const auto& ride : GetRideManager()) { - if (ride.status == RIDE_STATUS_OPEN && ride.excitement >= RIDE_RATING(7, 00) && ride.subtype < RIDE_TYPE_COUNT) + if (ride.status == RIDE_STATUS_OPEN && ride.excitement >= RIDE_RATING(7, 00) && ride.subtype != RIDE_ENTRY_INDEX_NULL) { auto rideEntry = ride.GetRideEntry(); if (rideEntry != nullptr)