Skip to content

Commit

Permalink
use LegacyBoosterSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
spacek531 committed May 2, 2024
1 parent 4277292 commit b9456b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/openrct2/ride/Ride.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5444,7 +5444,7 @@ bool RideHasRatings(const Ride& ride)

int32_t GetBoosterSpeed(ride_type_t rideType, int32_t rawSpeed)
{
int8_t shiftFactor = GetRideTypeDescriptor(rideType).OperatingSettings.BoosterSpeedFactor;
int8_t shiftFactor = GetRideTypeDescriptor(rideType).LegacyBoosterSettings.BoosterSpeedFactor;
if (shiftFactor == 0)
{
return rawSpeed;
Expand Down
8 changes: 4 additions & 4 deletions src/openrct2/ride/Vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2535,7 +2535,7 @@ void Vehicle::UpdateDeparting()
case RideMode::UpwardLaunch:
if ((curRide->launch_speed << 16) > velocity)
{
acceleration = curRide->launch_speed << rtd.OperatingSettings.AccelerationFactor;
acceleration = curRide->launch_speed << rtd.BoosterSettings.AccelerationFactor;
}
break;
case RideMode::DownwardLaunch:
Expand Down Expand Up @@ -7108,7 +7108,7 @@ bool Vehicle::UpdateTrackMotionForwards(const CarEntry* carEntry, const Ride& cu
auto boosterSpeed = GetBoosterSpeed(curRide.type, (brake_speed << 16));
if (boosterSpeed > _vehicleVelocityF64E08)
{
acceleration = GetRideTypeDescriptor(curRide.type).OperatingSettings.BoosterAcceleration
acceleration = GetRideTypeDescriptor(curRide.type).LegacyBoosterSettings.BoosterAcceleration
<< 16; //_vehicleVelocityF64E08 * 1.2;
}
}
Expand All @@ -7120,7 +7120,7 @@ bool Vehicle::UpdateTrackMotionForwards(const CarEntry* carEntry, const Ride& cu
if ((trackType == TrackElemType::Flat && curRide.type == RIDE_TYPE_REVERSE_FREEFALL_COASTER)
|| (trackType == TrackElemType::PoweredLift))
{
acceleration = GetRideTypeDescriptor(curRide.type).OperatingSettings.PoweredLiftAcceleration << 16;
acceleration = GetRideTypeDescriptor(curRide.type).LegacyBoosterSettings.PoweredLiftAcceleration << 16;
}
if (trackType == TrackElemType::BrakeForDrop)
{
Expand Down Expand Up @@ -7490,7 +7490,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c
auto boosterSpeed = GetBoosterSpeed(curRide.type, (brake_speed << 16));
if (boosterSpeed < _vehicleVelocityF64E08)
{
acceleration = GetRideTypeDescriptor(curRide.type).OperatingSettings.BoosterAcceleration << 16;
acceleration = GetRideTypeDescriptor(curRide.type).LegacyBoosterSettings.BoosterAcceleration << 16;
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/openrct2/ride/coaster/meta/SingleRailRollerCoaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ constexpr RideTypeDescriptor SingleRailRollerCoasterRTD =
RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS,
.RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned),
.DefaultMode = RideMode::ContinuousCircuit,
.OperatingSettings = { 0, 0 },
.LegacyBoosterSettings = { 15, 52 },
.BoosterSettings = { 15, 52 },
.LegacyBoosterSettings = { 15, 52, 0 },
.Naming = { STR_RIDE_NAME_SINGLE_RAIL_ROLLER_COASTER, STR_RIDE_DESCRIPTION_SINGLE_RAIL_ROLLER_COASTER },
.NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station },
Expand Down

0 comments on commit b9456b6

Please sign in to comment.