New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add legacy field for booster parameters to Ride Type Descriptor #21956
Add legacy field for booster parameters to Ride Type Descriptor #21956
Conversation
b9456b6
to
6c51596
Compare
6c51596
to
69c33a4
Compare
I added the second commit simplifying the GetBoosterSpeed function since I am already touching the RTD data. The new GetBoosterSpeed function I believe will handle signed values better, but even if there's no change with respect to signed values, I posit that it is better since it removes two branches. If this is preferred as its own PR, I can rebase it out. |
69c33a4
to
8b9bfa6
Compare
8b9bfa6
to
d571e53
Compare
src/openrct2/ride/RideData.h
Outdated
}; | ||
|
||
struct RideBoosterSettings | ||
{ | ||
uint8_t PoweredLiftAcceleration; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also zero-initialise these two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have zero-initialized these for now. They are intended to be changed in a future PR as part of #21752
@@ -31,7 +31,9 @@ constexpr RideTypeDescriptor LIMLaunchedRollerCoasterRTD = | |||
RIDE_TYPE_FLAG_ALLOW_REVERSED_TRAINS, | |||
.RideModes = EnumsToFlags(RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch, RideMode::PoweredLaunchBlockSectioned), | |||
.DefaultMode = RideMode::PoweredLaunchPasstrough, | |||
.OperatingSettings = { 10, 31, 26, 18, 52, 0 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes the maximum brakes speed, is that intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No and yes. No, this doesn't change maximum brake speed because the value isn't used. Yes, it is intentional because it makes the maximum speed value match current behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine in general, I have two small requests and two questions. See the line notes.
LGTM, please rebase. |
0af3151
to
673ce1d
Compare
This pull request is spun off from Unify Speed #16692 for ease of review, as well as making it easier to address some future features independent of Unify Speed.
This PR separates the OperationSettings field of RTD into 3 new fields, since the OperationSettings struct was bloated with things that are not operation settings.
This PR implements legacy and non-legacy ("modern") booster setting fields. In preparation for Unify Speed, the legacy properties are set to match the values as they stand. Separating legacy from modern allows the modern values to be changed in accordance with #21752 while preserving backwards-compatibility.
Unify Speed or a spun-off subset PR will implement a vehicle flag to switch between legacy and modern behavior, which all older parks will import with, while new rides will use the non-legacy "modern" behavior. Unify speed or a spin-off will implement enforcing brake and booster speeds.