diff --git a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h index 25b7074a32..f62d3e71fa 100644 --- a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h +++ b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h @@ -2124,6 +2124,14 @@ typedef enum { // - `s16 yawTarget` (stick world-space yaw, promoted to int in va_list) VB_PLAYER_ROLL_STEER, + // #### `result` + // ```c + // this->ageProperties->unk_24 <= ySurface + // ``` + // #### `args` + // - `Player*` + VB_PLAYER_SPAWN_SWIMMING, + // #### `result` // ```c // item == ITEM_SAW @@ -3237,14 +3245,6 @@ typedef enum { // - `s16* (&this->actor.parent->id)` VB_PREVENT_HOOKSHOT_PARENT_SOFTLOCK, - // #### `result` - // ```c - // false if Link is adult, water level is lowered, and entering Lake from Domain - // ``` - // #### `args` - // - `Player*` - VB_LAKE_HYLIA_PREVENT_DOMAIN_SWIM, - // #### `result` // true if Goron Link is talking // ``` diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index 65c29c184e..731a135ecb 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -1851,7 +1851,7 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l *should = false; break; } - case VB_LAKE_HYLIA_PREVENT_DOMAIN_SWIM: { + case VB_PLAYER_SPAWN_SWIMMING: { // Don't swim as adult coming from Domain to Lake with low water. // Caused by waterbox first frame y surface always being -1313.0f Player* player = va_arg(args, Player*); diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 85997712a2..4a9b529ac5 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -6638,10 +6638,9 @@ s32 Player_SetStartingMovement(PlayState* play, Player* this, f32 arg2) { ySurface = this->actor.world.pos.y; if (WaterBox_GetSurface1(play, &play->colCtx, this->actor.world.pos.x, this->actor.world.pos.z, &ySurface, - &waterbox) && - GameInteractor_Should(VB_LAKE_HYLIA_PREVENT_DOMAIN_SWIM, true, this)) { + &waterbox)) { ySurface -= this->actor.world.pos.y; - if (this->ageProperties->unk_24 <= ySurface) { + if (GameInteractor_Should(VB_PLAYER_SPAWN_SWIMMING, this->ageProperties->unk_24 <= ySurface, this)) { Player_SetupAction(play, this, Player_Action_8084D7C4, 0); Player_AnimChangeLoopSlowMorph(play, this, &gPlayerAnim_link_swimer_swim); this->stateFlags1 |= PLAYER_STATE1_IN_WATER | PLAYER_STATE1_IN_CUTSCENE;