From f1a45cf2ecf8a87b03e3a209153fd7d779065d76 Mon Sep 17 00:00:00 2001 From: Archez Date: Wed, 26 Mar 2025 15:05:06 -0400 Subject: [PATCH] Fix Tektite texture body break parts for custom skeletons (#5214) * Fix Tektite body break parts for custom skeletons * explicit null check --- soh/src/overlays/actors/ovl_En_Part/z_en_part.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/soh/src/overlays/actors/ovl_En_Part/z_en_part.c b/soh/src/overlays/actors/ovl_En_Part/z_en_part.c index 0a91e0e88..02afa040e 100644 --- a/soh/src/overlays/actors/ovl_En_Part/z_en_part.c +++ b/soh/src/overlays/actors/ovl_En_Part/z_en_part.c @@ -299,11 +299,17 @@ void EnPart_Draw(Actor* thisx, PlayState* play) { gSPSegment(POLY_OPA_DISP++, 0x08, func_80ACEAC0(play->state.gfxCtx, 255, 255, 255, 180, 180, 180)); gSPSegment(POLY_OPA_DISP++, 0x09, func_80ACEAC0(play->state.gfxCtx, 225, 205, 115, 25, 20, 0)); gSPSegment(POLY_OPA_DISP++, 0x0A, func_80ACEAC0(play->state.gfxCtx, 225, 205, 115, 25, 20, 0)); - } else if ((thisx->params == 9) && (strcmp((const char*)this->displayList, object_tite_DL_002FF0) == 0)) { + // #region SOH [Port] DL references are stored as resource paths so we need to use string comparison to check + // for equality. Additionally, we added a fallback for checking the parent actor ID to account for mods the + // override the Tektite skelton + } else if ((thisx->params == 9) && ((strcmp((const char*)this->displayList, object_tite_DL_002FF0) == 0) || + (thisx->parent != NULL && thisx->parent->id == ACTOR_EN_TITE))) { gSPSegment(POLY_OPA_DISP++, 0x08, object_tite_Tex_001300); gSPSegment(POLY_OPA_DISP++, 0x09, object_tite_Tex_001700); gSPSegment(POLY_OPA_DISP++, 0x0A, object_tite_Tex_001900); - } else if ((thisx->params == 10) && (strcmp((const char*)this->displayList, object_tite_DL_002FF0) == 0)) { + } else if ((thisx->params == 10) && ((strcmp((const char*)this->displayList, object_tite_DL_002FF0) == 0) || + (thisx->parent != NULL && thisx->parent->id == ACTOR_EN_TITE))) { + // #endregion gSPSegment(POLY_OPA_DISP++, 0x08, object_tite_Tex_001B00); gSPSegment(POLY_OPA_DISP++, 0x09, object_tite_Tex_001F00); gSPSegment(POLY_OPA_DISP++, 0x0A, object_tite_Tex_002100);