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

Merge pull request #2984 from Capostrophic/optimizer

Avoid optimizing animated shapes once again (regression #5565)
This commit is contained in:
Bret Curtis 2020-08-07 22:09:02 +02:00 committed by GitHub
commit 05a19f4f93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -625,8 +625,8 @@ namespace NifOsg
bool isAnimated = false; bool isAnimated = false;
handleNodeControllers(nifNode, node, animflags, isAnimated); handleNodeControllers(nifNode, node, animflags, isAnimated);
hasAnimatedParents |= isAnimated; hasAnimatedParents |= isAnimated;
// Make sure empty nodes are not optimized away so the physics system can find them. // Make sure empty nodes and animated shapes are not optimized away so the physics system can find them.
if (isAnimated || (hasAnimatedParents && (skipMeshes || hasMarkers))) if (isAnimated || (hasAnimatedParents && ((skipMeshes || hasMarkers) || isGeometry)))
node->setDataVariance(osg::Object::DYNAMIC); node->setDataVariance(osg::Object::DYNAMIC);
// LOD and Switch nodes must be wrapped by a transform (the current node) to support transformations properly // LOD and Switch nodes must be wrapped by a transform (the current node) to support transformations properly