diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 45627055a8..07ab8e09c6 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -12,6 +12,7 @@ - Fix: [#19210] The load/save window executes the loading code twice, resulting in a slowdown. - Fix: [#22056] Potential crash upon exiting the game. - Fix: [#22208] Cursor may fail to register hits in some cases (original bug). +- Fix: [#22284] Unrated rides cause high amount of nausea. - Fix: [#22304] Graphs don't draw lines on the left edge of the screen. - Fix: [#22318] Water sparkles are missing if transparent water is enabled without RCT1 linked. diff --git a/src/openrct2-ui/windows/RideList.cpp b/src/openrct2-ui/windows/RideList.cpp index d977691e2d..595e9eef99 100644 --- a/src/openrct2-ui/windows/RideList.cpp +++ b/src/openrct2-ui/windows/RideList.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -914,17 +915,24 @@ static Widget _rideListWidgets[] = { break; case INFORMATION_TYPE_EXCITEMENT: SortListByPredicate([](const Ride& thisRide, const Ride& otherRide) -> bool { - return thisRide.ratings.excitement <= otherRide.ratings.excitement; + const auto leftValue = thisRide.ratings.isNull() ? kRideRatingUndefined : thisRide.ratings.excitement; + const auto rightValue = otherRide.ratings.isNull() ? kRideRatingUndefined + : otherRide.ratings.excitement; + return leftValue <= rightValue; }); break; case INFORMATION_TYPE_INTENSITY: SortListByPredicate([](const Ride& thisRide, const Ride& otherRide) -> bool { - return thisRide.ratings.intensity <= otherRide.ratings.intensity; + const auto leftValue = thisRide.ratings.isNull() ? kRideRatingUndefined : thisRide.ratings.intensity; + const auto rightValue = otherRide.ratings.isNull() ? kRideRatingUndefined : otherRide.ratings.intensity; + return leftValue <= rightValue; }); break; case INFORMATION_TYPE_NAUSEA: SortListByPredicate([](const Ride& thisRide, const Ride& otherRide) -> bool { - return thisRide.ratings.nausea <= otherRide.ratings.nausea; + const auto leftValue = thisRide.ratings.isNull() ? kRideRatingUndefined : thisRide.ratings.nausea; + const auto rightValue = otherRide.ratings.isNull() ? kRideRatingUndefined : otherRide.ratings.nausea; + return leftValue <= rightValue; }); break; } diff --git a/src/openrct2/ride/RideRatings.cpp b/src/openrct2/ride/RideRatings.cpp index 8c029ad4ad..b677e18800 100644 --- a/src/openrct2/ride/RideRatings.cpp +++ b/src/openrct2/ride/RideRatings.cpp @@ -2268,6 +2268,4 @@ bool RatingTuple::isNull() const void RatingTuple::setNull() { excitement = kRideRatingUndefined; - intensity = kRideRatingUndefined; - nausea = kRideRatingUndefined; }