1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Skip the Update traversal for inactive skeletons

This commit is contained in:
scrawl 2015-06-30 03:25:30 +02:00
parent ca21e9ecb1
commit 43f9c7f295
2 changed files with 9 additions and 0 deletions

View file

@ -133,6 +133,13 @@ bool Skeleton::getActive() const
return mActive;
}
void Skeleton::traverse(osg::NodeVisitor& nv)
{
if (!mActive && nv.getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR && mLastFrameNumber != 0)
return;
osg::Group::traverse(nv);
}
Bone::Bone()
: mNode(NULL)
{

View file

@ -53,6 +53,8 @@ namespace SceneUtil
bool getActive() const;
void traverse(osg::NodeVisitor& nv);
private:
// The root bone is not a "real" bone, it has no corresponding node in the scene graph.
// As far as the scene graph goes we support multiple root bones.