diff --git a/soh/soh/Enhancements/mods.cpp b/soh/soh/Enhancements/mods.cpp index 32763e274..2190588d9 100644 --- a/soh/soh/Enhancements/mods.cpp +++ b/soh/soh/Enhancements/mods.cpp @@ -760,7 +760,7 @@ void UpdatePatchHand() { ResourceMgr_UnpatchGfxByName(gLinkChildLeftFistAndBoomerangNearDL, "adultBoomerang"); ResourceMgr_UnpatchGfxByName(gLinkChildRightFistAndDekuShieldNearDL, "adultDekuShield"); } - if ((CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && LINK_IS_ADULT && Player_IsCustomLinkModel) { + if ((CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && LINK_IS_ADULT) { ResourceMgr_PatchCustomGfxByName(gLinkChildLeftFistNearDL, "customAdultHand1", 0, gsSPDisplayListOTRFilePath(gLinkAdultLeftHandClosedNearDL)); ResourceMgr_PatchCustomGfxByName(gLinkChildLeftFistNearDL, "customAdultHand2", 1, gsSPEndDisplayList()); ResourceMgr_PatchCustomGfxByName(gLinkChildRightHandClosedNearDL, "customAdultHand3", 0, gsSPDisplayListOTRFilePath(gLinkAdultRightHandClosedNearDL)); @@ -771,7 +771,7 @@ void UpdatePatchHand() { ResourceMgr_UnpatchGfxByName(gLinkChildRightHandClosedNearDL, "customAdultHand3"); ResourceMgr_UnpatchGfxByName(gLinkChildRightHandClosedNearDL, "customAdultHand4"); } - if ((CVarGetInteger("gEnhancements.CustomEquipDlists", 0)) && LINK_IS_CHILD && Player_IsCustomLinkModel) { + if ((CVarGetInteger("gEnhancements.EquimentAlwaysVisible", 0)) && LINK_IS_CHILD) { ResourceMgr_PatchCustomGfxByName(gLinkAdultLeftHandClosedNearDL, "customChildHand1", 0, gsSPDisplayListOTRFilePath(gLinkChildLeftFistNearDL)); ResourceMgr_PatchCustomGfxByName(gLinkAdultLeftHandClosedNearDL, "customChildHand2", 1, gsSPEndDisplayList()); ResourceMgr_PatchCustomGfxByName(gLinkAdultRightHandClosedNearDL, "customChildHand3", 0, gsSPDisplayListOTRFilePath(gLinkChildRightHandClosedNearDL)); @@ -794,7 +794,7 @@ void PatchOrUnpatch(const char* resource, const char* gfx, const char* dlist1, c if (resource == NULL || gfx == NULL || dlist1 == NULL || dlist2 == NULL) return; - if (ResourceGetIsCustomByName(gfx) && CVarGetInteger("gEnhancements.CustomEquipDlists", 0)) { + if (ResourceGetIsCustomByName(gfx) && CVarGetInteger("gAltAssets", 0)) { if (alternateDL == NULL || ResourceGetIsCustomByName(alternateDL) || ResourceMgr_FileExists(alternateDL)) { ResourceMgr_PatchCustomGfxByName(resource, dlist1, 0, gsSPDisplayListOTRFilePath(gfx)); if (dlist3 == NULL) { diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 00925e1a6..86393cb0e 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1395,6 +1395,7 @@ extern "C" void Graph_ProcessGfxCommands(Gfx* commands) { // Actually update the CVar now before runing the alt asset update listeners CVarSetInteger("gAltAssets", !CVarGetInteger("gAltAssets", 0)); + UpdatePatchCustomEquipmentDlists(); gfx_texture_cache_clear(); SOH::SkeletonPatcher::UpdateSkeletons(); GameInteractor::Instance->ExecuteHooks(); diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index 52ab7a474..487c2b81e 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -5,6 +5,7 @@ #include "objects/object_link_child/object_link_child.h" #include "objects/object_triforce_spot/object_triforce_spot.h" #include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h" +#include "objects/object_custom_equip/object_custom_equip.h" #include "soh/Enhancements/game-interactor/GameInteractor.h" #include "soh/Enhancements/randomizer/draw.h" @@ -1279,11 +1280,10 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx** } } - if (CVarGetInteger("gEnhancements.CustomEquipDlists", 0) && CVarGetInteger("gEnhancements.ScaleAdultEquimentAsChild", 0) && LINK_IS_CHILD) { + if (ResourceGetIsCustomByName(gCustomDekuShieldOnBackScaledDL) && CVarGetInteger("gEnhancements.ScaleAdultEquimentAsChild", 0) && LINK_IS_CHILD) { if (limbIndex == PLAYER_LIMB_SHEATH) { if ((this->currentShield == PLAYER_SHIELD_DEKU && gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI && (this->sheathType == PLAYER_MODELTYPE_SHEATH_18 || this->sheathType == PLAYER_MODELTYPE_SHEATH_19))) { - // Matrix_Translate(218, -100, 62, MTXMODE_APPLY); Matrix_Scale(0.8, 0.8, 0.8, MTXMODE_APPLY); } }