Fix crashes due to current texture not being set before loading (#61, #95)

This commit is contained in:
Max Roncace
2026-03-16 16:27:38 -04:00
parent c71d1b4aa6
commit 2679b7d02b
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -208,6 +208,9 @@ void dMirror_packet_c::modelDraw(J3DModel* i_model, Mtx param_1) {
color.a = kankyo->bg_amb_col[0].a;
J3DModelData* modelData = i_model->getModelData();
#if TARGET_PC
j3dSys.setTexture(modelData->getTexture());
#endif
u16 materialNum = modelData->getMaterialNum();
for (u16 i = 0; i < materialNum; i++) {
J3DMatPacket* matPacket = i_model->getMatPacket(i);
+3
View File
@@ -2199,6 +2199,9 @@ void mDoExt_invJntPacket::draw() {
if (field_0x16) {
J3DModelData* sp20 = field_0x10->getModelData();
#if TARGET_PC
j3dSys.setTexture(sp20->getTexture());
#endif
J3DJoint* sp1C = sp20->getJointNodePointer(field_0x14);
for (J3DMaterial* mesh = sp1C->getMesh(); mesh != NULL; mesh = mesh->getNext()) {