1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 04:23:20 +01:00

contain rating mods in pp directives

This commit is contained in:
e-foley
2015-11-02 20:23:22 -08:00
parent 73eed6830a
commit 5f799ac6c4

View File

@@ -624,6 +624,15 @@ static void ride_ratings_calculate(rct_ride *ride)
calcFunc(ride);
}
#ifdef ORIGINAL_RATINGS
if (ride->ratings.excitement != -1) {
// Address underflows allowed by original RCT2 code
ride->ratings.excitement = max(0, ride->ratings.excitement);
ride->ratings.intensity = max(0, ride->ratings.intensity);
ride->ratings.nausea = max(0, ride->ratings.nausea);
}
#endif
// Original ride calculation
// calcFunc = RCT2_ADDRESS(0x0097E050, ride_ratings_calculation)[ride->type];
// RCT2 CALLPROC X((int)calcFunc, 0, 0, 0, 0, 0, (int)ride, 0);
@@ -786,6 +795,21 @@ static void ride_ratings_apply_adjustments(rct_ride *ride, rating_tuple *ratings
ratings->nausea += ((ratings->nausea * rideEntry->nausea_multipler ) >> 7);
// Apply total air time
#ifdef ORIGINAL_RATINGS
if (RideData4[ride->type].flags & RIDE_TYPE_FLAG4_HAS_AIR_TIME) {
uint16 totalAirTime = ride->total_air_time;
if (rideEntry->flags & RIDE_ENTRY_FLAG_11) {
if (totalAirTime >= 96) {
totalAirTime -= 96;
ratings->excitement -= totalAirTime / 8;
ratings->nausea += totalAirTime / 16;
}
} else {
ratings->excitement += totalAirTime / 8;
ratings->nausea += totalAirTime / 16;
}
}
#else
if (RideData4[ride->type].flags & RIDE_TYPE_FLAG4_HAS_AIR_TIME) {
if (rideEntry->flags & RIDE_ENTRY_FLAG_11) {
// Limit airtime bonus for heartline twister coaster (see issues #2031 and #2064)
@@ -795,6 +819,7 @@ static void ride_ratings_apply_adjustments(rct_ride *ride, rating_tuple *ratings
}
ratings->nausea += ride->total_air_time / 16;
}
#endif
}
/**