diff --git a/code/XFileExporter.cpp b/code/XFileExporter.cpp index 55cf95c5d..d0d05fea6 100644 --- a/code/XFileExporter.cpp +++ b/code/XFileExporter.cpp @@ -309,12 +309,12 @@ void XFileExporter::WriteNode( aiNode* pNode) WriteFrameTransform(m); - for (size_t i = 0; i < pNode->mNumMeshes; i++) + for (size_t i = 0; i < pNode->mNumMeshes; ++i) WriteMesh(mScene->mMeshes[pNode->mMeshes[i]]); // recursive call the Nodes for (size_t i = 0; i < pNode->mNumChildren; ++i) - WriteNode( mScene->mRootNode->mChildren[i]); + WriteNode(pNode->mChildren[i]); PopTag();