diff options
| author | Chris <f1ana@users.noreply.github.com> | 2026-06-30 00:10:56 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-30 04:10:56 +0000 |
| commit | c5835669fec5c804156943b5cd6e8da3a1bd6489 (patch) | |
| tree | 353450b5ef3612ff1befd1375582a621ad05f26e /soh/src/code | |
| parent | 1fd3a467cdbfc125935f8816d53b7b82421bd80a (diff) | |
Hookifying Various Cheats and FixVineFall (#6827)
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/z_bgcheck.c | 7 | ||||
| -rw-r--r-- | soh/src/code/z_parameter.c | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/soh/src/code/z_bgcheck.c b/soh/src/code/z_bgcheck.c index e98e66e44..3cce952f5 100644 --- a/soh/src/code/z_bgcheck.c +++ b/soh/src/code/z_bgcheck.c @@ -3,6 +3,7 @@ #include "soh/OTRGlobals.h" #include "soh/ResourceManagerHelpers.h" +#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h" #include <assert.h> #define SS_NULL 0xFFFF @@ -1892,7 +1893,7 @@ s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResul s32 bgId2; f32 nx, ny, nz; // unit normal of polygon - if (CVarGetInteger(CVAR_CHEAT("NoClip"), 0) && actor != NULL && actor->id == ACTOR_PLAYER) { + if (!GameInteractor_Should(VB_PERFORM_WALL_COLLISION_CHECK, true, actor)) { return false; } @@ -4011,7 +4012,7 @@ u32 func_80041D94(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) { * SurfaceType Get Wall Flags */ s32 func_80041DB8(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) { - if (CVarGetInteger(CVAR_CHEAT("ClimbEverything"), 0) != 0) { + if (GameInteractor_Should(VB_SURFACE_IS_CLIMBABLE, false)) { return (1 << 3) | D_80119D90[func_80041D94(colCtx, poly, bgId)]; } else { return D_80119D90[func_80041D94(colCtx, poly, bgId)]; @@ -4108,7 +4109,7 @@ u32 SurfaceType_GetEcho(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) * SurfaceType Is Hookshot Surface */ u32 SurfaceType_IsHookshotSurface(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) { - return CVarGetInteger(CVAR_CHEAT("HookshotEverything"), 0) || SurfaceType_GetData(colCtx, poly, bgId, 1) >> 17 & 1; + return GameInteractor_Should(VB_SURFACE_IS_HOOKSHOT, SurfaceType_GetData(colCtx, poly, bgId, 1) >> 17 & 1); } /** diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index c378d15f4..9a63d8de5 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -5776,7 +5776,7 @@ void Interface_Draw(PlayState* play) { if ((play->pauseCtx.state == 0) && (play->pauseCtx.debugState == 0)) { if (gSaveContext.minigameState != 1) { // Carrots rendering if the action corresponds to riding a horse - if (interfaceCtx->unk_1EE == 8 && !CVarGetInteger(CVAR_CHEAT("InfiniteEponaBoost"), 0)) { + if (interfaceCtx->unk_1EE == 8 && GameInteractor_Should(VB_DRAW_EPONA_BOOST_CARROTS, true)) { // Load Carrot Icon gDPLoadTextureBlock(OVERLAY_DISP++, gCarrotIconTex, G_IM_FMT_RGBA, G_IM_SIZ_32b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, |
