Fix for Epona spawning when entering scene on water#2553
Open
djevangelia wants to merge 5 commits into
Open
Conversation
flagrama
reviewed
Apr 16, 2026
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.
Prevent spawning on Epona on water when entering an Epona-allowed scene when "exited on horse" is set. Fixes #2012.
When Epona is spawned during scene entry, there is no check to ensure she doesn't spawn on water.
The Y displacement is due to line checks not being run and therefore variables for front and back Y position are not updated.
The displacement is thus to Y 0.0 - Lake Hylia 0.0 is up in the sky. See the issue above for more details.
Entering a new scene,
Player_SetStartingMovementchecks if a waterbox is below player (regardless if above or under the ground floor). The new function check runs directly after waterbox check if there is a waterbox:R_EXITED_SCENE_RIDING_HORSE(decomp name) is true, and if the scene allows EponaDebug run example: https://www.youtube.com/watch?v=rd34SAitudE (Ares)
The number 0-1 is
R_EXITED_SCENE_RIDING_HORSE. If it is set to 0 due to water, text is displayed.Code questions:
CollisionContextstruct from decomp to z64.h/z64_game to callBgCheck_AnyLineTest1. I assume a different name is needed.BgCheck_AnyLineTest1in z_player.c because it's only called by two actors in vanilla, so the demand isn't high.R_EXITED_SCENE_RIDING_HORSEin player.h because it's player related and needed to access it from debug, but maybe that too could be put in z_player.c or z64.h.Testing
Tested in Ares 1.47, Project64 3.0.1 and Mupen64plus 2.8 by entering areas in debug. For this testing, easiest way is to bind
R_EXITED_SCENE_RIDING_HORSE(include player.h), like putting this indebug_utilities: