From ac366f1603213f7ad12b25d35f9b4a97d5053057 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 30 Nov 2015 04:28:20 +0100 Subject: [PATCH] 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. --- components/nifosg/nifloader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 45e7c16df8..18ece51016 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -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 {