Fix: Reset waterbox collisions in Lake Hylia and Morphas room#2346
Merged
dcvz merged 2 commits intoHarbourMasters:develop-bradleyfrom Jan 17, 2023
Merged
Fix: Reset waterbox collisions in Lake Hylia and Morphas room#2346dcvz merged 2 commits intoHarbourMasters:develop-bradleyfrom
dcvz merged 2 commits intoHarbourMasters:develop-bradleyfrom
Conversation
briaguya0
reviewed
Jan 17, 2023
| // Go slightly beyond -681 so the smoothing doesn't slow down too much (matches the reverse of water rise func) | ||
| Math_SmoothStepToF(&this->lakeHyliaWaterLevel, -682.0f, 0.1f, 1.0f, 0.001f); | ||
| play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].ySurface = WATER_LEVEL_RIVER_LOWERED; | ||
| play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].zMin = WATER_LEVEL_RIVER_LOWER_Z - 50; |
Contributor
There was a problem hiding this comment.
@Archez this 50 feels like a magic number, could you explain where it's coming from?
Contributor
Author
There was a problem hiding this comment.
Its to mimic what happens from the Init func
I can instead create a separate #define that contains the subtraction
Contributor
There was a problem hiding this comment.
I can instead create a separate #define that contains the subtraction
no need, thanks for explaining!
briaguya0
approved these changes
Jan 17, 2023
dcvz
approved these changes
Jan 17, 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.
Due to Ships resource caching and the game code modifying waterbox collisions, modifications are permanently made to the cached data, meaning that subsequent loads of scenes already have modified waterboxes and behave incorrectly.
In lieu of a cache invalidation mechanism for scenes, this PR resets the modified waterboxes to their original load value when ever the scene loads/unloads.
Both Lake Hylia and Morphas room have fixes added to fix the waterbox as reported from the issue bellow.
Fixes #2331
Build Artifacts