1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-13 12:40:04 +00:00

Don't consider NiCollisionSwitch unoptimizeable

This commit is contained in:
Alexei Dobrohotov 2022-04-06 06:42:06 +03:00
parent 81e9212db9
commit eafa66ff40

View File

@ -517,13 +517,6 @@ namespace NifOsg
if (!node)
node = new NifOsg::MatrixTransform(nifNode->trafo);
if (nifNode->recType == Nif::RC_NiCollisionSwitch && !(nifNode->flags & Nif::NiNode::Flag_ActiveCollision))
{
node->setNodeMask(Loader::getIntersectionDisabledNodeMask());
// This node must not be combined with another node.
dataVariance = osg::Object::DYNAMIC;
}
node->setDataVariance(dataVariance);
return node;
@ -639,6 +632,9 @@ namespace NifOsg
node->setNodeMask(Loader::getHiddenNodeMask());
}
if (nifNode->recType == Nif::RC_NiCollisionSwitch && !(nifNode->flags & Nif::NiNode::Flag_ActiveCollision))
node->setNodeMask(Loader::getIntersectionDisabledNodeMask());
osg::ref_ptr<SceneUtil::CompositeStateSetUpdater> composite = new SceneUtil::CompositeStateSetUpdater;
applyNodeProperties(nifNode, node, composite, imageManager, boundTextures, animflags);