From e6150ea8daa55c2c5435d0563f8dc43b7ad722c3 Mon Sep 17 00:00:00 2001 From: Garrett Cox Date: Mon, 31 Oct 2022 16:28:03 -0500 Subject: [PATCH] Add cheat: hookshot everything (#1874) --- soh/soh/GameMenuBar.cpp | 2 ++ soh/src/code/z_bgcheck.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/soh/soh/GameMenuBar.cpp b/soh/soh/GameMenuBar.cpp index 45b67a23a..1c04ba69c 100644 --- a/soh/soh/GameMenuBar.cpp +++ b/soh/soh/GameMenuBar.cpp @@ -1358,6 +1358,8 @@ namespace GameMenuBar { UIWidgets::Tooltip("Allows you to walk through walls"); UIWidgets::PaddedEnhancementCheckbox("Climb Everything", "gClimbEverything", true, false); UIWidgets::Tooltip("Makes every surface in the game climbable"); + UIWidgets::PaddedEnhancementCheckbox("Hookshot Everything", "gHookshotEverything", true, false); + UIWidgets::Tooltip("Makes every surface in the game hookshot-able"); UIWidgets::PaddedEnhancementCheckbox("Moon Jump on L", "gMoonJumpOnL", true, false); UIWidgets::Tooltip("Holding L makes you float into the air"); UIWidgets::PaddedEnhancementCheckbox("Super Tunic", "gSuperTunic", true, false); diff --git a/soh/src/code/z_bgcheck.c b/soh/src/code/z_bgcheck.c index a141d9f13..e8721fdfb 100644 --- a/soh/src/code/z_bgcheck.c +++ b/soh/src/code/z_bgcheck.c @@ -4118,7 +4118,7 @@ u32 SurfaceType_GetEcho(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) * SurfaceType Is Hookshot Surface */ u32 SurfaceType_IsHookshotSurface(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) { - return SurfaceType_GetData(colCtx, poly, bgId, 1) >> 17 & 1; + return CVar_GetS32("gHookshotEverything", 0) || SurfaceType_GetData(colCtx, poly, bgId, 1) >> 17 & 1; } /**