1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 15:39:02 +00:00

Fix the rig bounds being updated twice per frame

Unlike what I expected, the osgUtil::UpdateVisitor is set to traverse all children (not only active children). The FrameSwitch was thus traversing both RigGeometries part of the double-buffering scheme, rather than only the one active in the current frame.
This commit is contained in:
scrawl 2015-11-30 04:28:20 +01:00
parent e49bce7b40
commit ac366f1603

View File

@ -100,7 +100,7 @@ namespace
virtual void traverse(osg::NodeVisitor& nv)
{
if (nv.getTraversalMode() != osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN)
if (nv.getTraversalMode() != osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN && nv.getVisitorType() != osg::NodeVisitor::UPDATE_VISITOR)
osg::Group::traverse(nv);
else
{