diff --git a/CMakeLists.txt b/CMakeLists.txt
index 41d1396c5c..0e76f1d9c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,9 +81,9 @@ set(OPENMSX_VERSION "1.6")
set(OPENMSX_URL "https://github.com/OpenRCT2/OpenMusic/releases/download/v${OPENMSX_VERSION}/openmusic.zip")
set(OPENMSX_SHA1 "ba170fa6d777b309c15420f4b6eb3fa25082a9d1")
-set(REPLAYS_VERSION "0.0.83")
+set(REPLAYS_VERSION "0.0.84")
set(REPLAYS_URL "https://github.com/OpenRCT2/replays/releases/download/v${REPLAYS_VERSION}/replays.zip")
-set(REPLAYS_SHA1 "FFC98C36AFEC68DC6A48E863413D4E2364A202B3")
+set(REPLAYS_SHA1 "90B848AB344E29A2CF1E3E48539F06F5845772C3")
option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.")
option(WITH_TESTS "Build tests")
diff --git a/distribution/changelog.txt b/distribution/changelog.txt
index cf74b70b6c..2b502777bf 100644
--- a/distribution/changelog.txt
+++ b/distribution/changelog.txt
@@ -5,6 +5,7 @@
- Improved: [#23123] Improve sorting of roller coasters in build new ride menu.
- Improved: [#23211] Add boosters to classic wooden roller coaster (cheats only).
- Fix: [#23206] Multiplayer desyncs when FPS is uncapped.
+- Fix: [#23238] Updating a guest’s favourite ride works differently from vanilla RCT2.
0.4.16 (2024-11-03)
------------------------------------------------------------------------
diff --git a/openrct2.proj b/openrct2.proj
index 1d96adb75c..f48b09c334 100644
--- a/openrct2.proj
+++ b/openrct2.proj
@@ -51,8 +51,8 @@
b1b1f1b241d2cbff63a1889c4dc5a09bdf769bfb
https://github.com/OpenRCT2/OpenMusic/releases/download/v1.6/openmusic.zip
ba170fa6d777b309c15420f4b6eb3fa25082a9d1
- https://github.com/OpenRCT2/replays/releases/download/v0.0.83/replays.zip
- FFC98C36AFEC68DC6A48E863413D4E2364A202B3
+ https://github.com/OpenRCT2/replays/releases/download/v0.0.84/replays.zip
+ 90B848AB344E29A2CF1E3E48539F06F5845772C3
diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp
index 8950d68c9c..13a160e37f 100644
--- a/src/openrct2/entity/Guest.cpp
+++ b/src/openrct2/entity/Guest.cpp
@@ -440,7 +440,7 @@ static void PeepRideIsTooIntense(Guest* peep, Ride& ride, bool peepAtRide);
static void PeepResetRideHeading(Guest* peep);
static void PeepTriedToEnterFullQueue(Guest* peep, Ride& ride);
static int16_t PeepCalculateRideSatisfaction(Guest* peep, const Ride& ride);
-static void PeepUpdateFavouriteRide(Guest* peep, const Ride& ride);
+static void GuestUpdateFavouriteRide(Guest& peep, const Ride& ride, const uint8_t satisfaction);
static int16_t PeepCalculateRideValueSatisfaction(Guest* peep, const Ride& ride);
static int16_t PeepCalculateRideIntensityNauseaSatisfaction(Guest* peep, const Ride& ride);
static void PeepUpdateRideNauseaGrowth(Guest* peep, const Ride& ride);
@@ -1761,7 +1761,7 @@ void Guest::OnEnterRide(Ride& ride)
GuestNumRides++;
SetHasRidden(ride);
- PeepUpdateFavouriteRide(this, ride);
+ GuestUpdateFavouriteRide(*this, ride, satisfaction);
HappinessTarget = std::clamp(HappinessTarget + satisfaction, 0, kPeepMaxHappiness);
PeepUpdateRideNauseaGrowth(this, ride);
}
@@ -2703,24 +2703,24 @@ static int16_t PeepCalculateRideSatisfaction(Guest* peep, const Ride& ride)
/**
* Check to see if the specified ride should become the peep's favourite.
- * For this, a "ride rating" is calculated based on the excitement of the ride and the peep's current happiness.
- * As this value cannot exceed 255, the happier the peep is, the more irrelevant the ride's excitement becomes.
+ * For this, a "ride rating" is calculated based on the excitement of the ride and the satisfaction of the ride.
+ * As this value cannot exceed 255, the more satisfied the peep is, the more irrelevant the ride's excitement becomes.
* Due to the minimum happiness requirement, an excitement rating of more than 3.8 has no further effect.
*
* If the ride rating is higher than any ride the peep has already been on and the happiness criteria is met,
* the ride becomes the peep's favourite. (This doesn't happen right away, but will be updated once the peep
* exits the ride.)
*/
-static void PeepUpdateFavouriteRide(Guest* peep, const Ride& ride)
+static void GuestUpdateFavouriteRide(Guest& peep, const Ride& ride, uint8_t satisfaction)
{
- peep->PeepFlags &= ~PEEP_FLAGS_RIDE_SHOULD_BE_MARKED_AS_FAVOURITE;
- uint8_t peepRideRating = std::clamp((ride.ratings.excitement / 4) + peep->Happiness, 0, kPeepMaxHappiness);
- if (peepRideRating >= peep->FavouriteRideRating)
+ peep.PeepFlags &= ~PEEP_FLAGS_RIDE_SHOULD_BE_MARKED_AS_FAVOURITE;
+ uint8_t peepRideRating = std::clamp((ride.ratings.excitement / 4) + satisfaction, 0, kPeepMaxHappiness);
+ if (peepRideRating >= peep.FavouriteRideRating)
{
- if (peep->Happiness >= 160 && peep->HappinessTarget >= 160)
+ if (peep.Happiness >= 160 && peep.HappinessTarget >= 160)
{
- peep->FavouriteRideRating = peepRideRating;
- peep->PeepFlags |= PEEP_FLAGS_RIDE_SHOULD_BE_MARKED_AS_FAVOURITE;
+ peep.FavouriteRideRating = peepRideRating;
+ peep.PeepFlags |= PEEP_FLAGS_RIDE_SHOULD_BE_MARKED_AS_FAVOURITE;
}
}
}
diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp
index d8095e0b6e..b739f31ecd 100644
--- a/src/openrct2/network/NetworkBase.cpp
+++ b/src/openrct2/network/NetworkBase.cpp
@@ -49,7 +49,7 @@ using namespace OpenRCT2;
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.
-constexpr uint8_t kNetworkStreamVersion = 1;
+constexpr uint8_t kNetworkStreamVersion = 2;
const std::string kNetworkStreamID = std::string(OPENRCT2_VERSION) + "-" + std::to_string(kNetworkStreamVersion);