Fix: Bugs not working for soil patches with bugs don't despawn cheat#3457
Merged
aMannus merged 1 commit intoHarbourMasters:develop-macreadyfrom Nov 29, 2023
Merged
Conversation
briaguya0
approved these changes
Nov 28, 2023
| // For bugs that aren't linked to a soil patch, we remove the "short lived" flag to prevent them from despawning | ||
| // And exit early to not increment the "bugs dropped count" | ||
| if (CVarGetInteger("gNoBugsDespawn", 0) && this->soilActor == NULL) { | ||
| this->unk_314 &= ~4; |
Contributor
There was a problem hiding this comment.
would love to see this not be magic numbers but considering the unk i figure that can come in with a docs pull at some point
Contributor
Author
There was a problem hiding this comment.
Yeah this entire actor file is wonderfully doc'ed in decomp upstream 😉 (I referenced decomp for these changes)
Updating against decomp should be a nice freebie for the develop branch later.
(I have a short list of a few files that I'd like to update once we do another macready->dev)
garrettjoecox
approved these changes
Nov 28, 2023
aMannus
approved these changes
Nov 29, 2023
A-Green-Spoon
pushed a commit
to A-Green-Spoon/Shipwright
that referenced
this pull request
Nov 30, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Bugs Don't despawn" cheat was interferring with bugs ability to dig into the soil patches as the check was preventing the "dig" action func from ever running. The dig action func is responsible for informing the soil patch that the bugs are done digging and to then spawn the gold skulltula.
This PR resolves that by moving the logic to the init func and checking to see if a soil patch is linked to the bugs. If there is no soil patch, then we remove the flag that marks the bug as a "short lived" bug, effectively making it never dig. The other important part is to not increment the "bugs dropped count" value. Normally if there is 4 or more bugs "dropped", then new bugs dropped instantly dig in place. For a soil patch to spawn the GS, the bugs need to dig directly in the center. By not incrementing the dropped count for the bugs, the new ones will correctly path find to the soil patch and dig properly.
Build Artifacts