From 4396411d1072b24a4bb77658b453a4286e030fb2 Mon Sep 17 00:00:00 2001 From: Garrett Cox Date: Sat, 5 Nov 2022 08:37:32 -0500 Subject: [PATCH] Add enhancement for making nuts explode bombs, similar to bombchus (#1906) --- soh/soh/GameMenuBar.cpp | 2 ++ soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/soh/soh/GameMenuBar.cpp b/soh/soh/GameMenuBar.cpp index 4d9f29e8d..f32fd9f33 100644 --- a/soh/soh/GameMenuBar.cpp +++ b/soh/soh/GameMenuBar.cpp @@ -819,6 +819,8 @@ namespace GameMenuBar { UIWidgets::Tooltip("Wearing the Bunny Hood grants a speed increase like in Majora's Mask"); UIWidgets::PaddedEnhancementCheckbox("Mask Select in Inventory", "gMaskSelect", true, false); UIWidgets::Tooltip("After completing the mask trading sub-quest, press A and any direction on the mask slot to change masks"); + UIWidgets::PaddedEnhancementCheckbox("Nuts explode bombs", "gNutsExplodeBombs", true, false); + UIWidgets::Tooltip("Makes nuts explode bombs, similar to how they interact with bombchus. This does not affect bombflowers."); ImGui::EndMenu(); } diff --git a/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c index 06b42cd79..76b072797 100644 --- a/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -103,6 +103,9 @@ void EnBom_Init(Actor* thisx, GlobalContext* globalCtx) { Collider_SetCylinder(globalCtx, &this->bombCollider, thisx, &sCylinderInit); Collider_SetJntSph(globalCtx, &this->explosionCollider, thisx, &sJntSphInit, &this->explosionColliderItems[0]); this->explosionColliderItems[0].info.toucher.damage += (thisx->shape.rot.z & 0xFF00) >> 8; + if (CVar_GetS32("gNutsExplodeBombs", 0)) { + this->bombCollider.info.bumper.dmgFlags |= 1; + } thisx->shape.rot.z &= 0xFF; if (thisx->shape.rot.z & 0x80) {