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 reparenting an agent deactivates its HSM #131

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

limbonaut
Copy link
Owner

Resolves #128

@limbonaut limbonaut added the bug Something isn't working label Jun 3, 2024
@limbonaut limbonaut force-pushed the fix-reparenting-issue branch from 8ac252e to 06de524 Compare June 3, 2024 12:55
@limbonaut limbonaut merged commit adff6bd into master Jun 3, 2024
18 checks passed
@limbonaut limbonaut deleted the fix-reparenting-issue branch June 3, 2024 13:50
limbonaut added a commit that referenced this pull request Sep 22, 2024
Since #131, `LimboState::_exit()` became a source of potential crashes
if object references are used without a validity check. It's too easy
to miss this, which can lead to game crashing during runtime.

This fix reverts #131 change and proposes alternative approach of
re-activating root HSM upon tree entering if it was previously active.
Note that it's not an ideal solution, as some state will be lost upon
re-parenting: HSM exits and then re-activates and enters its initial state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reparenting an agent sets its HSM to inactive
1 participant