Fix Tektite texture body break parts for custom skeletons (#5214)

* Fix Tektite body break parts for custom skeletons

* explicit null check
This commit is contained in:
Archez 2025-03-26 15:05:06 -04:00 committed by GitHub
commit f1a45cf2ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);