Prevent removing main camera pointer by Play_ClearCamera#2580
Draft
djevangelia wants to merge 2 commits into
Draft
Prevent removing main camera pointer by Play_ClearCamera#2580djevangelia wants to merge 2 commits into
djevangelia wants to merge 2 commits into
Conversation
Author
|
I tested today for the Wallmaster cutscene softlock in randomizer and to my surprise, it actually seems already fixed somehow. So this PR will fix issue #2003 completely. Wallmaster + cutscene in decomp and randomizer: https://www.youtube.com/watch?v=JDcUn0ScUXQ |
Author
|
Rewrite is a bit buggy so need to look at it again. |
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.
When too many subcam cutscenes, prevent main camera pointer getting set to NULL. Fixes #2003.
See the linked issue and video for more details. In short this fixes crashing in the Spirit Temple mirror room due to too many sun and chest cutscenes at the same time. I've had this fixed in my R&D build for weeks but not pushed it because I have a slight ungrounded fear that removing the main camera pointer could potentially be something that happens normally sometimes - but nothing has happened and I doubt
Play_ClearCamerawould be the function doing that if it even were to happen during gameplay.Disassembly
Play_ClearCamera NTSC 1.0 matching disassembly here https://gist.github.com/djevangelia/feab5feb6ba51e4387466df77cb5861d
Testing
Tested on Ares recent nightly build and Project64 3.0.1.
Works like this: https://www.youtube.com/watch?v=ymp2OFTM7Lg
For testing and reproduction, see code here: https://gist.github.com/djevangelia/38b0c0741752be046a1f6447077b6d08