mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
Reverts #22199 changes that seem to cause a nausea bug on untested rides Nulls are now considered higher values than anything, making them appear on the tail of ascending lists again Checking for NULL in ratings.intensity and ratings.nausea didn't work, they seem to retain there values pre ratings reset and setting them to null would change the behaviour of the game - so instead we check for ratings.isNull() in the sorting to properly put null ratings to tail of sorted lists.
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <openrct2/interface/Colour.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/network/network.h>
|
||||
#include <openrct2/ride/RideRatings.h>
|
||||
#include <openrct2/sprites.h>
|
||||
#include <openrct2/util/Util.h>
|
||||
#include <openrct2/windows/Intent.h>
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -2268,6 +2268,4 @@ bool RatingTuple::isNull() const
|
||||
void RatingTuple::setNull()
|
||||
{
|
||||
excitement = kRideRatingUndefined;
|
||||
intensity = kRideRatingUndefined;
|
||||
nausea = kRideRatingUndefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user