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

Account for removed object dependency in Deku Scrub Leader #3878

Merged
merged 2 commits into from Feb 2, 2024

Conversation

Rozelette
Copy link
Contributor

@Rozelette Rozelette commented Jan 24, 2024

Fixes #161
When an actor is spawned as a child, it is spawned, and then the parent and child pointers are set. In the Deku Scrub Leader's Init, it stores its parent to a new pointer and uses that pointer to signal to other actors. If the parent is set after Init, how does this work?

Well, that is because Init is not called until the actor's object dependency is loaded. Because we completely ignore that (all object are treated as loaded all the time), Init is always ran right as an actor is spawned.

To account for this behavior, I have added a second attempt to store the parent in leader's action function immediately following load.

Note that in the vanilla game, the original behavior is actually a bug. Theoretically, the object could be loaded on frame 1. This is almost certainly never going to happen in practice, however.

Build Artifacts

@Rozelette Rozelette changed the base branch from develop to develop-macready January 25, 2024 15:54
@Rozelette Rozelette changed the base branch from develop-macready to develop January 25, 2024 15:55
@Rozelette Rozelette changed the base branch from develop to develop-macready February 1, 2024 05:30
@Rozelette
Copy link
Contributor Author

Force-pushed to rebase on develop-macready

@garrettjoecox garrettjoecox merged commit bb1078e into HarbourMasters:develop-macready Feb 2, 2024
8 checks passed
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.

deku theater Scrubs running in circles
5 participants