Hookshot parent softlock fix - #2595
Open
djevangelia wants to merge 1 commit into
Open
Conversation
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.
Pulling out Hookshot when player already has a parent set that isn't Hookshot results in player being stuck in fly-land-fly. Player can move slowly, pause and enter scene transitions, but if there are none reachable it's a softlock state.
In vanilla this is rare, easiest is probably patrol Moblin in water, but I know it's been done with Like like too. However, if enemies that grab player and set themselves as parent can spawn in new areas, this increases the risk of this happening (like falling down En_Holl and get despawned while grabbing).
Fix: When checking if player should start Hookshot flying, ensure that the parent actor really is Hookshot.
There are other oddities with having a parent set, but considering this can force a reset and the fix doesn't impact anything else, I think it's good to preemptively fix this even if it is rare/impossible to encounter right now and the rest can be left to when new enemy spawns are added (ensure each enemy removes parent if they are destroyed while grabbing player etc).
Testing
Tested in ares recent nightly release and Project64 3.0.1.
Softlock and fix look like this: https://www.youtube.com/watch?v=2BrYwUpd4rE
The C fix has been merged into SoH develop branch HarbourMasters/Shipwright@53b9db5
For quick testing this can be used, set player to parent: