-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix #23743: park with > 32k guests goal not in scenario list #23887
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
Conversation
Should I fix formatting first or wait until the review? |
Yes, please fix the formatting. The full CI won't run until you do. |
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 needs a changelog entry.
Also, for good measure, please also modify the corresponding struct member of S6Info
.
Sure. I just want to point out that I got quiet confused while tracking this one down and maybe there should also other struct members be changed, not only this one. As seen below, at least maybe #scenariorepository.h (the one this PR will change)
struct ScenarioIndexEntry
{
...
// Objective
uint8_t ObjectiveType;
uint8_t ObjectiveArg1; // years
int64_t ObjectiveArg2; // money or excitement
int16_t ObjectiveArg3; // guests or rideID or coasterLength
...
};
#rct2.h
struct S6Info
{
...
uint8_t ObjectiveType; // 0x02
uint8_t ObjectiveArg1; // 0x03
int32_t ObjectiveArg2; // 0x04
int16_t ObjectiveArg3; // 0x08
...
};
#rct2.h
struct ScoresEntry
{
....
int8_t ObjectiveType;
int8_t ObjectiveArg1;
int32_t objectiveArg2;
int16_t objectiveArg3;
...
};
#scenario.h
uint8_t Type;
uint8_t Year;
union
{
uint16_t NumGuests;
StringId RideId;
uint16_t MinimumLength; // For the "Build 10 coasters of minimum length" objective.
};
union
{
money64 Currency;
ride_rating MinimumExcitement; // For the "Finish 5 coaster with a minimum excitement rating" objective.
};
|
I think you’re right. |
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.
Nice little change. Looks good to me!
Creating the scenario cache file tried to read the guest count as signed 16 bit value which doesnt work for values > 32k. In addition ObjectiveArg3 (variable to store guest count) is an signed value, unable to store 50k guests
Creating the scenario cache file tried to read the guest count as signed 16 bit value which doesn't work for values > 32k. In addition
ObjectiveArg3
inScenarioRepository.h
(variable to store guest count) is an signed value, unable to store 50k guests