Skip to content
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

Fix setting mission stats #5614

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

MjnMixael
Copy link
Contributor

I think when I originally tested this I used the return value to verify that it was working. Turns out that wasn't a good enough test because the scoring_struct_h explicitly makes a copy of the player stats, probably to prevent manipulation. However, in the case of storing and reloading mission stats (for checkpoints), we need to actually apply the stats to the player's stats and not the copied stats.

So I've added a way to get the player from the scoring stats and in the case of setting the mission stats, apply them directly so that it actually.. ya know.. works.

@wookieejedi wookieejedi added cleanup A modification or rewrite of code to make it more understandable or easier to maintain. fix A fix for bugs, not-a-bugs, and/or regressions. pilot file An issue related to the PLR or CSG files labels Sep 19, 2023
@TRBlount TRBlount merged commit 8fed443 into scp-fs2open:master Sep 20, 2023
14 checks passed
@MjnMixael MjnMixael deleted the fix_setting_mission_stats branch September 20, 2023 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup A modification or rewrite of code to make it more understandable or easier to maintain. fix A fix for bugs, not-a-bugs, and/or regressions. pilot file An issue related to the PLR or CSG files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants