summaryrefslogtreecommitdiff
path: root/src/JSystem/J3DGraphAnimator/J3DModelData.cpp
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2023-09-30 15:59:54 -0700
committerJasper St. Pierre <jstpierre@mecheye.net>2023-09-30 15:59:54 -0700
commitf90a89fd8771fa0e0a7159cb46d7ba6bdf64d3fb (patch)
treeb12c8eb500e646029e52095dd646ae4c400f85b5 /src/JSystem/J3DGraphAnimator/J3DModelData.cpp
parent57e735af3911621ce9482d033697bd95cbfdf290 (diff)
J3DModelData fakematch, J3DModel progress
Diffstat (limited to 'src/JSystem/J3DGraphAnimator/J3DModelData.cpp')
-rw-r--r--src/JSystem/J3DGraphAnimator/J3DModelData.cpp8
1 files changed, 5 insertions, 3 deletions
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;