From 663e4303006a92b18251f28712aae549385eb3fd Mon Sep 17 00:00:00 2001 From: e-foley Date: Sat, 24 Oct 2015 14:54:15 -0700 Subject: [PATCH] cap airtime bonus Caps airtime addition to excitement rating rather than allowing infinite subtraction --- src/ride/ride_ratings.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/ride/ride_ratings.c b/src/ride/ride_ratings.c index 7e8b49d5f0..37ae617dea 100644 --- a/src/ride/ride_ratings.c +++ b/src/ride/ride_ratings.c @@ -794,17 +794,13 @@ static void ride_ratings_apply_adjustments(rct_ride *ride, rating_tuple *ratings // Apply total air time 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; - } + // Limit airtime bonus for heartline twister coaster (see issues #2031 and #2064) + ratings->excitement += min(ride->total_air_time, 96) / 8; } else { - ratings->excitement += totalAirTime / 8; - ratings->nausea += totalAirTime / 16; + ratings->excitement += ride->total_air_time / 8; } + ratings->nausea += ride->total_air_time / 16; } }