diff --git a/soh/soh/Enhancements/bootcommands.c b/soh/soh/Enhancements/bootcommands.c index 4a73eec6b42..2546f304b3e 100644 --- a/soh/soh/Enhancements/bootcommands.c +++ b/soh/soh/Enhancements/bootcommands.c @@ -24,6 +24,7 @@ void BootCommands_Init() CVar_RegisterS32("gDisableLOD", 0); CVar_RegisterS32("gDebugEnabled", 0); CVar_RegisterS32("gPauseLiveLink", 0); + CVar_RegisterS32("gAccessibleInteraction", 0); CVar_RegisterS32("gMoreTargets", 0); CVar_RegisterS32("gAimAudioCues", 0); } diff --git a/soh/src/overlays/actors/ovl_En_Box/z_en_box.c b/soh/src/overlays/actors/ovl_En_Box/z_en_box.c index 7d8886953d6..22022653eeb 100644 --- a/soh/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/soh/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -420,10 +420,16 @@ void EnBox_WaitOpen(EnBox* this, GlobalContext* globalCtx) { osSyncPrintf("Actor_Environment_Tbox_On() %d\n", this->dyna.actor.params & 0x1F); Flags_SetTreasure(globalCtx, this->dyna.actor.params & 0x1F); } else { - player = GET_PLAYER(globalCtx); - func_8002DBD0(&this->dyna.actor, &sp4C, &player->actor.world.pos); - if (sp4C.z > -50.0f && sp4C.z < 0.0f && fabsf(sp4C.y) < 10.0f && fabsf(sp4C.x) < 20.0f && - Player_IsFacingActor(&this->dyna.actor, 0x3000, globalCtx)) { + bool isPlayerInFrontOfActor; + if (CVar_GetS32("gAccessibleInteraction", 0)) { + isPlayerInFrontOfActor = true; + } else { + player = GET_PLAYER(globalCtx); + func_8002DBD0(&this->dyna.actor, &sp4C, &player->actor.world.pos); + isPlayerInFrontOfActor = sp4C.z > -50.0f && sp4C.z < 0.0f && fabsf(sp4C.y) < 10.0f && fabsf(sp4C.x) < 20.0f; + } + + if (isPlayerInFrontOfActor && Player_IsFacingActor(&this->dyna.actor, 0x3000, globalCtx)) { func_8002F554(&this->dyna.actor, globalCtx, 0 - (this->dyna.actor.params >> 5 & 0x7F)); } if (Flags_GetTreasure(globalCtx, this->dyna.actor.params & 0x1F)) {