diff --git a/src/openrct2/actions/RideCreateAction.hpp b/src/openrct2/actions/RideCreateAction.hpp index 75d2885530..2479ce71ae 100644 --- a/src/openrct2/actions/RideCreateAction.hpp +++ b/src/openrct2/actions/RideCreateAction.hpp @@ -266,7 +266,7 @@ public: } std::fill(std::begin(ride->num_customers), std::end(ride->num_customers), 0); - ride->value = 0xFFFF; + ride->value = RIDE_VALUE_UNDEFINED; ride->satisfaction = 255; ride->satisfaction_time_out = 0; ride->satisfaction_next = 0; diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 7fe5dee77e..b6471a231d 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1724,7 +1724,7 @@ bool rct_peep::ShouldGoOnRide(ride_id_t rideIndex, int32_t entranceNum, bool atQ { // Peeps that are leaving the park will refuse to go on any rides, with the exception of free transport rides. assert(ride->type < std::size(RideData4)); - if (!(RideData4[ride->type].flags & RIDE_TYPE_FLAG4_TRANSPORT_RIDE) || ride->value == 0xFFFF + if (!(RideData4[ride->type].flags & RIDE_TYPE_FLAG4_TRANSPORT_RIDE) || ride->value == RIDE_VALUE_UNDEFINED || ride_get_price(ride) != 0) { if (peep_flags & PEEP_FLAGS_LEAVING_PARK) @@ -1793,7 +1793,8 @@ bool rct_peep::ShouldGoOnRide(ride_id_t rideIndex, int32_t entranceNum, bool atQ // Assuming the queue conditions are met, peeps will always go on free transport rides. // Ride ratings, recent crashes and weather will all be ignored. money16 ridePrice = ride_get_price(ride); - if (!(RideData4[ride->type].flags & RIDE_TYPE_FLAG4_TRANSPORT_RIDE) || ride->value == 0xFFFF || ridePrice != 0) + if (!(RideData4[ride->type].flags & RIDE_TYPE_FLAG4_TRANSPORT_RIDE) || ride->value == RIDE_VALUE_UNDEFINED + || ridePrice != 0) { if (previous_ride == rideIndex) { @@ -2500,7 +2501,7 @@ static int16_t peep_calculate_ride_value_satisfaction(rct_peep* peep, Ride* ride return -30; } - if (ride->value == 0xFFFF) + if (ride->value == RIDE_VALUE_UNDEFINED) { return -30; } diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index a4f8ecaaa9..22684b5642 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -6304,7 +6304,7 @@ static int32_t vehicle_update_motion_dodgems(rct_vehicle* vehicle) } } - uint16_t collideSprite = 0xFFFF; + uint16_t collideSprite = SPRITE_INDEX_NULL; if (vehicle->dodgems_collision_direction != 0) { @@ -6367,7 +6367,7 @@ static int32_t vehicle_update_motion_dodgems(rct_vehicle* vehicle) vehicle->velocity = 0; uint8_t direction = vehicle->sprite_direction | 1; - if (collideSprite != 0xFFFF) + if (collideSprite != SPRITE_INDEX_NULL) { vehicle->var_34 = (scenario_rand() & 1) ? 1 : -1;