-
Notifications
You must be signed in to change notification settings - Fork 116
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
Validate selected Titan loadout index better #762
Validate selected Titan loadout index better #762
Conversation
I assume there isn't an easy way to test this? |
|
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.
Confirmed working in testing.
Performed the steps as described here: #762 (comment)
- Without PR -> script crash
- With PR -> reset the invalid TitanLoadout
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.
Tested and by setting pdata index beyond 6 and it falls back to Ion.
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.
Confirmed working in testing.
With this PR, selectedTitanLoadoutIndex
is set to 0 if it's deemed invalid, effectively resetting player titan to Ion.
Merging based on reviews |
Seemingly there are cases where mods can set an invalid Titan loadout index, which then causes the progression checks to attempt to set the player's Titan model to an invalid index.
This PR just adds a check to ensure that it is within the bounds of the titan loadout array.