diff --git a/components/nif/extra.cpp b/components/nif/extra.cpp index 30b8952dc2..1cc5f68d43 100644 --- a/components/nif/extra.cpp +++ b/components/nif/extra.cpp @@ -128,4 +128,14 @@ namespace Nif } } + void BSInvMarker::read(NIFStream* nif) + { + Extra::read(nif); + float rotX = nif->getUShort() / 1000.0; + float rotY = nif->getUShort() / 1000.0; + float rotZ = nif->getUShort() / 1000.0; + mScale = nif->getFloat(); + + mRotation = osg::Quat(rotX, osg::X_AXIS, rotY, osg::Y_AXIS, rotZ, osg::Z_AXIS); + } } diff --git a/components/nif/extra.hpp b/components/nif/extra.hpp index 0da573ade5..f0120565c7 100644 --- a/components/nif/extra.hpp +++ b/components/nif/extra.hpp @@ -146,5 +146,13 @@ namespace Nif void read(NIFStream* nif) override; }; + struct BSInvMarker : public Extra + { + osg::Quat mRotation; + float mScale = 1.0f; + + void read(NIFStream* nif) override; + }; + } // Namespace #endif diff --git a/components/nif/niffile.cpp b/components/nif/niffile.cpp index 8e8a1bf385..9ab2f5fa75 100644 --- a/components/nif/niffile.cpp +++ b/components/nif/niffile.cpp @@ -190,6 +190,7 @@ namespace Nif { "BSMultiBound", &construct }, { "BSMultiBoundOBB", &construct }, { "BSMultiBoundSphere", &construct }, + { "BSInvMarker", &construct }, }; } diff --git a/components/nif/record.hpp b/components/nif/record.hpp index afd23ac21c..550f09c424 100644 --- a/components/nif/record.hpp +++ b/components/nif/record.hpp @@ -162,6 +162,7 @@ namespace Nif RC_BSMultiBound, RC_BSMultiBoundOBB, RC_BSMultiBoundSphere, + RC_BSInvMarker, }; /// Base class for all records