From f90a89fd8771fa0e0a7159cb46d7ba6bdf64d3fb Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sat, 30 Sep 2023 15:59:54 -0700 Subject: J3DModelData fakematch, J3DModel progress --- src/JSystem/J3DGraphAnimator/J3DModelData.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/JSystem/J3DGraphAnimator/J3DModelData.cpp') diff --git a/src/JSystem/J3DGraphAnimator/J3DModelData.cpp b/src/JSystem/J3DGraphAnimator/J3DModelData.cpp index 3c04517b..6d6d6c53 100644 --- a/src/JSystem/J3DGraphAnimator/J3DModelData.cpp +++ b/src/JSystem/J3DGraphAnimator/J3DModelData.cpp @@ -63,8 +63,10 @@ void J3DJointTree::makeHierarchy(J3DNode* pRootNode, const J3DModelHierarchy** p } break; case kTypeMaterial: - *pHierarchy = inf + 1; - pNewMaterial = pMaterialTable->mMaterialNodePointer[inf->mValue]; + { + *pHierarchy = inf + 1; + pNewMaterial = pMaterialTable->getMaterialNodePointer(inf->getValue()); + } break; case kTypeShape: *pHierarchy = inf + 1; @@ -81,7 +83,7 @@ void J3DJointTree::makeHierarchy(J3DNode* pRootNode, const J3DModelHierarchy** p } else if (pNewMaterial != NULL && pRootNode->getType() == 'NJNT') { ((J3DJoint*)pRootNode)->addMesh(pNewMaterial); pNewMaterial->mJoint = ((J3DJoint*)pRootNode); - } else if (pNewShape != NULL && pNewNode->getType() == 'NJNT') { + } else if (pNewShape != NULL && pRootNode->getType() == 'NJNT') { pNewMaterial = ((J3DJoint*)pRootNode)->getMesh(); pNewMaterial->mShape = pNewShape; pNewShape->mMaterial = pNewMaterial; -- cgit v1.2.3