diff options
Diffstat (limited to 'src/JSystem/J3DGraphAnimator/J3DModelData.cpp')
| -rw-r--r-- | src/JSystem/J3DGraphAnimator/J3DModelData.cpp | 8 |
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; |
