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 known Enemy Randomizer crashes #2242

Merged

Conversation

aMannus
Copy link
Contributor

@aMannus aMannus commented Dec 22, 2022

The comment in the code should explain what this does pretty well.

The peahat tries to set a property of its parent which is normally a big peahat, but when spawned from anywhere else, that parent won't have that property to begin with, which leads to a crash when it dies. It only sets this property when it has a parent in the first place, so removing the parent is fine.

The floormaster tries to set its parent and child to another copy of itself when it dies and splits, which also crashes when the parent actor is already assigned/populated.

I've searched through every single instance of Actor_SpawnAsChild, and the only 3 times where it's used to spawn an enemy (that is eligible for randomization) is already handled through earlier changes I've made for Enemy Randomizer (see code comment).

I've also tested every single enemy in-game just to make sure I didn't miss any, and it's only the small peahats and floormasters that cause a crash when spawned as a child actor.

Build Artifacts

@briaguya-ai briaguya-ai merged commit 07bae6b into HarbourMasters:develop-bradley Dec 24, 2022
@aMannus aMannus deleted the fix-enemyrando-crashes branch December 24, 2022 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants