From 8c213cbfb164497bd3ec29b656faa2f225442660 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Wed, 5 Aug 2020 22:39:48 +0300 Subject: [PATCH] Avoid optimizing animated shapes once again (regression #5565) --- components/nifosg/nifloader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index f88800e364..21ae49975d 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -625,8 +625,8 @@ namespace NifOsg bool isAnimated = false; handleNodeControllers(nifNode, node, animflags, isAnimated); hasAnimatedParents |= isAnimated; - // Make sure empty nodes are not optimized away so the physics system can find them. - if (isAnimated || (hasAnimatedParents && (skipMeshes || hasMarkers))) + // Make sure empty nodes and animated shapes are not optimized away so the physics system can find them. + if (isAnimated || (hasAnimatedParents && ((skipMeshes || hasMarkers) || isGeometry))) node->setDataVariance(osg::Object::DYNAMIC); // LOD and Switch nodes must be wrapped by a transform (the current node) to support transformations properly