diff --git a/soh/soh/GameMenuBar.cpp b/soh/soh/GameMenuBar.cpp index 6fb66cfc9..8bf39d549 100644 --- a/soh/soh/GameMenuBar.cpp +++ b/soh/soh/GameMenuBar.cpp @@ -403,6 +403,8 @@ namespace GameMenuBar { UIWidgets::Tooltip("Makes nuts explode bombs, similar to how they interact with bombchus. This does not affect bombflowers."); UIWidgets::PaddedEnhancementCheckbox("Equip Multiple Arrows at Once", "gSeparateArrows", true, false); UIWidgets::Tooltip("Allow the bow and magic arrows to be equipped at the same time on different slots"); + UIWidgets::PaddedEnhancementCheckbox("Bow as Child/Slingshot as Adult", "gBowSlingShotAmmoFix", true, false); + UIWidgets::Tooltip("Allows child to use bow with arrows.\nAllows adult to use slingshot with seeds.\n\nRequires glitches or 'Timeless Equipment' cheat to equip."); UIWidgets::PaddedEnhancementCheckbox("Better Farore's Wind", "gBetterFW", true, false); UIWidgets::Tooltip("Helps FW persist between ages, gives child and adult separate FW points, and can be used in more places."); UIWidgets::PaddedEnhancementCheckbox("Static Explosion Radius", "gStaticExplosionRadius", true, false); diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index a14f05c55..438d5f7d0 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -2182,7 +2182,11 @@ void func_80834298(Player* this, PlayState* play) { // Determine projectile type for bow or slingshot s32 func_80834380(PlayState* play, Player* this, s32* itemPtr, s32* typePtr) { - if (LINK_IS_ADULT) { + bool useBow = LINK_IS_ADULT; + if(CVarGetInteger("gBowSlingShotAmmoFix", 0)){ + useBow = this->heldItemAction != PLAYER_IA_SLINGSHOT; + } + if (useBow) { *itemPtr = ITEM_BOW; if (this->stateFlags1 & PLAYER_STATE1_23) { *typePtr = ARROW_NORMAL_HORSE; @@ -11450,7 +11454,12 @@ s32 func_8084B3CC(PlayState* play, Player* this) { func_80835C58(play, this, func_8084FA54, 0); if (!func_8002DD6C(this) || Player_HoldsHookshot(this)) { - func_80835F44(play, this, 3); + s32 projectileItemToUse = ITEM_BOW; + if(CVarGetInteger("gBowSlingShotAmmoFix", 0)){ + projectileItemToUse = LINK_IS_ADULT ? ITEM_BOW : ITEM_SLINGSHOT; + } + + func_80835F44(play, this, projectileItemToUse); } this->stateFlags1 |= PLAYER_STATE1_20;