From e4f019f56165f4e2b463f77e02a9e6a7c03d7dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= <159546+serprex@users.noreply.github.com> Date: Sat, 3 Oct 2026 14:33:49 +0000 Subject: [PATCH] SwitchAge: prevent Link walking without collision for a bit (#7286) --- soh/soh/Enhancements/SwitchAge.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/soh/soh/Enhancements/SwitchAge.cpp b/soh/soh/Enhancements/SwitchAge.cpp index 71848f7eb1..cd6a457a4a 100644 --- a/soh/soh/Enhancements/SwitchAge.cpp +++ b/soh/soh/Enhancements/SwitchAge.cpp @@ -28,6 +28,7 @@ void SwitchAge() { gSaveContext.respawn[RESPAWN_MODE_DOWN].roomIndex = gPlayState->roomCtx.curRoom.num; gSaveContext.respawn[RESPAWN_MODE_DOWN].pos = player->actor.world.pos; gSaveContext.respawn[RESPAWN_MODE_DOWN].yaw = player->actor.shape.rot.y; + gSaveContext.entranceSpeed = 0.0f; if (gPlayState->roomCtx.curRoom.behaviorType2 < 4) { gSaveContext.respawn[RESPAWN_MODE_DOWN].playerParams = 0x0DFF; @@ -58,8 +59,12 @@ void SwitchAge() { } static HOOK_ID hookId = 0; + if (hookId != 0) { + GameInteractor::Instance->UnregisterGameHookForID(hookId); + } hookId = REGISTER_VB_SHOULD(VB_INFLICT_VOID_DAMAGE, { *should = false; GameInteractor::Instance->UnregisterGameHookForID(hookId); + hookId = 0; }); } \ No newline at end of file