diff options
| author | Archez <Archez@users.noreply.github.com> | 2025-03-26 15:05:06 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-26 20:05:06 +0100 |
| commit | f1a45cf2ecf8a87b03e3a209153fd7d779065d76 (patch) | |
| tree | ecc063f6d8dd3a86c93967c9618d51ebc5120752 | |
| parent | b2ba5a6481e1f296f430257884393c2c68ecee62 (diff) | |
Fix Tektite texture body break parts for custom skeletons (#5214)
* Fix Tektite body break parts for custom skeletons
* explicit null check
| -rw-r--r-- | soh/src/overlays/actors/ovl_En_Part/z_en_part.c | 10 |
1 files 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); |
