mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Merge pull request #25161 from Gymnasiast/change/ride-value-to-vanilla
Restore maximum ride price algo to vanilla
This commit is contained in:
@@ -82,9 +82,9 @@ set(OPENMSX_VERSION "1.6.1")
|
||||
set(OPENMSX_URL "https://github.com/OpenRCT2/OpenMusic/releases/download/v${OPENMSX_VERSION}/openmusic.zip")
|
||||
set(OPENMSX_SHA256 "994b350d3b180ee1cb9619fe27f7ebae3a1a5232840c4bd47a89f33fa89de1a1")
|
||||
|
||||
set(REPLAYS_VERSION "0.0.89")
|
||||
set(REPLAYS_VERSION "0.0.90")
|
||||
set(REPLAYS_URL "https://github.com/OpenRCT2/replays/releases/download/v${REPLAYS_VERSION}/replays.zip")
|
||||
set(REPLAYS_SHA256 "04607bb1f67a0f31d841ed70b38d65b8f7a9e19749e414ff74b8a434bc90b42a")
|
||||
set(REPLAYS_SHA256 "f8474a927e155056e5729b6fa9f05af2a85ae7e1435f5fa89ba496242f9f255e")
|
||||
|
||||
option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.")
|
||||
option(WITH_TESTS "Build tests")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
0.4.27 (in development)
|
||||
------------------------------------------------------------------------
|
||||
- Improved: [#2296, #2307] The land tool now takes sloped track and paths into account when modifying land.
|
||||
- Change: [#25161] Revert to the ‘fair ride price’ calculation of vanilla RCT2.
|
||||
- Fix: [#25131] The Reverse Freefall Coaster On-ride photo section track has incorrectly coloured ties.
|
||||
- Fix: [#25132] Crash when trying to use simulate on incomplete ride.
|
||||
- Fix: [#25134] Vehicles visually glitch on diagonal steep slopes.
|
||||
|
||||
@@ -224,8 +224,8 @@
|
||||
<OpenSFXSha256>06b90f3e19c216752df441d551b26a9e3e1ba7755bdd2102504b73bf993608be</OpenSFXSha256>
|
||||
<OpenMSXUrl>https://github.com/OpenRCT2/OpenMusic/releases/download/v1.6.1/openmusic.zip</OpenMSXUrl>
|
||||
<OpenMSXSha256>994b350d3b180ee1cb9619fe27f7ebae3a1a5232840c4bd47a89f33fa89de1a1</OpenMSXSha256>
|
||||
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.89/replays.zip</ReplaysUrl>
|
||||
<ReplaysSha256>04607bb1f67a0f31d841ed70b38d65b8f7a9e19749e414ff74b8a434bc90b42a</ReplaysSha256>
|
||||
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.90/replays.zip</ReplaysUrl>
|
||||
<ReplaysSha256>f8474a927e155056e5729b6fa9f05af2a85ae7e1435f5fa89ba496242f9f255e</ReplaysSha256>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Unified Dependency Target -->
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
// It is used for making sure only compatible builds get connected, even within
|
||||
// single OpenRCT2 version.
|
||||
|
||||
constexpr uint8_t kStreamVersion = 3;
|
||||
constexpr uint8_t kStreamVersion = 4;
|
||||
|
||||
const std::string kStreamID = std::string(kOpenRCT2Version) + "-" + std::to_string(kStreamVersion);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace OpenRCT2
|
||||
struct ObjectRepositoryItem;
|
||||
|
||||
// Current version that is saved.
|
||||
constexpr uint32_t kParkFileCurrentVersion = 57;
|
||||
constexpr uint32_t kParkFileCurrentVersion = 58;
|
||||
|
||||
// The minimum version that is forwards compatible with the current version.
|
||||
constexpr uint32_t kParkFileMinVersion = 57;
|
||||
@@ -60,6 +60,7 @@ namespace OpenRCT2
|
||||
constexpr uint16_t kExtendedGoKartsVersion = 54;
|
||||
constexpr uint16_t kHigherInversionsHolesHelicesStatsVersion = 55;
|
||||
constexpr uint16_t kFixedObsoleteFootpathsVersion = 56;
|
||||
constexpr uint16_t kRevertToVanillaFairRidePriceCalculation = 58;
|
||||
|
||||
class ParkFileExporter
|
||||
{
|
||||
|
||||
@@ -1111,21 +1111,7 @@ static void RideRatingsCalculateValue(Ride& ride)
|
||||
{
|
||||
int32_t months, multiplier, divisor, summand;
|
||||
};
|
||||
static const Row ageTableNew[] = {
|
||||
{ 5, 3, 2, 0 }, // 1.5x
|
||||
{ 13, 6, 5, 0 }, // 1.2x
|
||||
{ 40, 1, 1, 0 }, // 1x
|
||||
{ 64, 3, 4, 0 }, // 0.75x
|
||||
{ 88, 9, 16, 0 }, // 0.56x
|
||||
{ 104, 27, 64, 0 }, // 0.42x
|
||||
{ 120, 81, 256, 0 }, // 0.32x
|
||||
{ 128, 81, 512, 0 }, // 0.16x
|
||||
{ 200, 81, 1024, 0 }, // 0.08x
|
||||
{ 200, 9, 16, 0 }, // 0.56x "easter egg"
|
||||
};
|
||||
|
||||
#ifdef ORIGINAL_RATINGS
|
||||
static const Row ageTableOld[] = {
|
||||
static constexpr auto kAgeTable = std::to_array<Row>({
|
||||
{ 5, 1, 1, 30 }, // +30
|
||||
{ 13, 1, 1, 10 }, // +10
|
||||
{ 40, 1, 1, 0 }, // 1x
|
||||
@@ -1136,8 +1122,7 @@ static void RideRatingsCalculateValue(Ride& ride)
|
||||
{ 128, 81, 512, 0 }, // 0.16x
|
||||
{ 200, 81, 1024, 0 }, // 0.08x
|
||||
{ 200, 9, 16, 0 }, // 0.56x "easter egg"
|
||||
};
|
||||
#endif
|
||||
});
|
||||
|
||||
if (!RideHasRatings(ride))
|
||||
{
|
||||
@@ -1156,15 +1141,7 @@ static void RideRatingsCalculateValue(Ride& ride)
|
||||
monthsOld = ride.getAge();
|
||||
}
|
||||
|
||||
const Row* ageTable = ageTableNew;
|
||||
size_t tableSize = std::size(ageTableNew);
|
||||
|
||||
#ifdef ORIGINAL_RATINGS
|
||||
ageTable = ageTableOld;
|
||||
tableSize = std::size(ageTableOld);
|
||||
#endif
|
||||
|
||||
Row lastRow = ageTable[tableSize - 1];
|
||||
Row lastRow = kAgeTable[kAgeTable.size() - 1];
|
||||
|
||||
// Ride is older than oldest age in the table?
|
||||
if (monthsOld >= lastRow.months)
|
||||
@@ -1174,10 +1151,8 @@ static void RideRatingsCalculateValue(Ride& ride)
|
||||
else
|
||||
{
|
||||
// Find the first hit in the table that matches this ride's age
|
||||
for (size_t it = 0; it < tableSize; it++)
|
||||
for (const Row& curr : kAgeTable)
|
||||
{
|
||||
Row curr = ageTable[it];
|
||||
|
||||
if (monthsOld < curr.months)
|
||||
{
|
||||
value = (value * curr.multiplier) / curr.divisor + curr.summand;
|
||||
|
||||
Reference in New Issue
Block a user