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

feat: fix temporary implementation of IsPlayerCharacterInChargen() #108

Closed
wants to merge 0 commits into from

Conversation

TommInfinite
Copy link
Contributor

Due to what I assume is Bethesda bug after credit scene game assigns weird values to Chargen flags for the period of current gamesession. This fix will add a check for each flag separately and return the correct function result.

Comment on lines 30 to 39
std::uint8_t flags = *(RE::stl::adjust_pointer<std::uint8_t>(PC, 0xF24));

if (flags & 1 || flags & 2 || flags & 4)
{
return true;
}
else
{
return false;
}
Copy link
Contributor

@shadeMe shadeMe Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add a comment about this behaviour here and let someone else double-check if that's indeed what's happening. We shouldn't be making such changes willy-nilly at least until those flags are decoded.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. For anybody's information - prior to PR I tested flags by calling papyrus function SetInChargen(Bool abDisableSaving, Bool abDisableWaiting, Bool abShowControlsDisabledMessage) (29FAA60) with each argument and flags were set correctly by it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants