1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 07:23:51 +00:00

Take in account transformations of NiCollisionSwitch

This commit is contained in:
Andrei Kortunov 2020-02-25 11:09:36 +04:00
parent 22b4629fc6
commit 8c177f0306

View file

@ -168,10 +168,10 @@ namespace
namespace NifOsg
{
class CollisionSwitch : public osg::Group
class CollisionSwitch : public osg::MatrixTransform
{
public:
CollisionSwitch(bool enabled) : osg::Group()
CollisionSwitch(const osg::Matrixf& transformations, bool enabled) : osg::MatrixTransform(transformations)
{
setEnabled(enabled);
}
@ -477,7 +477,7 @@ namespace NifOsg
case Nif::RC_NiCollisionSwitch:
{
bool enabled = nifNode->flags & Nif::NiNode::Flag_ActiveCollision;
node = new CollisionSwitch(enabled);
node = new CollisionSwitch(nifNode->trafo.toMatrix(), enabled);
dataVariance = osg::Object::STATIC;
break;