diff --git a/soh/soh/Enhancements/customequipment.cpp b/soh/soh/Enhancements/customequipment.cpp index a162d3d10b..3e08c536d9 100644 --- a/soh/soh/Enhancements/customequipment.cpp +++ b/soh/soh/Enhancements/customequipment.cpp @@ -61,6 +61,16 @@ static Gfx* LoadCustomGfx(const char* path) { return ResourceMgr_LoadGfxByName(path); } +// Shooting Gallery being weird giving bow and then load slingshot model when child Link +// This function is used to determine if bow or slingshot model should be loaded +static bool UsesBowModel(Player* player) { + if (CVarGetInteger(CVAR_ENHANCEMENT("BowSlingshotAmmoFix"), 0) || + CVarGetInteger(CVAR_ENHANCEMENT("EquipmentAlwaysVisible"), 0)) { + return !Player_HoldsSlingshot(player); + } + return LINK_IS_ADULT; +} + static u8 sLastValidSwordEquip = EQUIP_VALUE_SWORD_NONE; static u8 GetEquippedSwordValue(PlayState* play) { @@ -317,7 +327,7 @@ static void RegisterCustomEquipment() { case PLAYER_MODELTYPE_RH_BOW_SLINGSHOT_2: fpsHand = isAdult ? gCustomAdultFPSHandDL : gCustomChildFPSHandDL; fpsWeapon = - Player_HoldsBow(player) + UsesBowModel(player) ? ResolveCustomChain({ gCustomFPSBowDL, gCustomBowDL, nullptr }) : ResolveCustomChain({ gCustomFPSSlingshotDL, gCustomSlingshotDL, nullptr }); break; @@ -391,7 +401,7 @@ static void RegisterCustomEquipment() { break; case PLAYER_MODELTYPE_RH_BOW_SLINGSHOT: case PLAYER_MODELTYPE_RH_BOW_SLINGSHOT_2: - customDL = Player_HoldsBow(player) ? gCustomBowDL : gCustomSlingshotDL; + customDL = UsesBowModel(player) ? gCustomBowDL : gCustomSlingshotDL; break; case PLAYER_MODELTYPE_RH_HOOKSHOT: customDL = (player->heldItemAction == PLAYER_IA_HOOKSHOT) ? gCustomHookshotDL