1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-06 08:15:34 +00:00

Read BSTreeNode, handle as NiNode

This commit is contained in:
Alexei Dobrohotov 2023-05-21 18:15:27 +03:00
parent 5b36ea0179
commit 3e8a9d1de4
3 changed files with 22 additions and 0 deletions

View file

@ -138,6 +138,7 @@ namespace Nif
{ "NiTransformData", &construct<NiKeyframeData, RC_NiKeyframeData> },
{ "BSFadeNode", &construct<NiNode, RC_NiNode> },
{ "BSLeafAnimNode", &construct<NiNode, RC_NiNode> },
{ "BSTreeNode", &construct<BSTreeNode, RC_NiNode> },
{ "bhkBlendController", &construct<bhkBlendController, RC_bhkBlendController> },
{ "NiFloatInterpolator", &construct<NiFloatInterpolator, RC_NiFloatInterpolator> },
{ "NiBoolInterpolator", &construct<NiBoolInterpolator, RC_NiBoolInterpolator> },

View file

@ -306,4 +306,18 @@ namespace Nif
for (auto& object : mObjects)
object.second.post(nif);
}
void BSTreeNode::read(NIFStream* nif)
{
NiNode::read(nif);
readRecordList(nif, mBones1);
readRecordList(nif, mBones2);
}
void BSTreeNode::post(Reader& nif)
{
NiNode::post(nif);
postRecordList(nif, mBones1);
postRecordList(nif, mBones2);
}
}

View file

@ -284,5 +284,12 @@ namespace Nif
void post(Reader& nif) override;
};
struct BSTreeNode : NiNode
{
NodeList mBones1, mBones2;
void read(NIFStream* nif) override;
void post(Reader& nif) override;
};
} // Namespace
#endif