mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 10:45:32 +00:00
Skip the Update traversal for inactive skeletons
This commit is contained in:
parent
ca21e9ecb1
commit
43f9c7f295
2 changed files with 9 additions and 0 deletions
|
@ -133,6 +133,13 @@ bool Skeleton::getActive() const
|
||||||
return mActive;
|
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()
|
Bone::Bone()
|
||||||
: mNode(NULL)
|
: mNode(NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,6 +53,8 @@ namespace SceneUtil
|
||||||
|
|
||||||
bool getActive() const;
|
bool getActive() const;
|
||||||
|
|
||||||
|
void traverse(osg::NodeVisitor& nv);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// The root bone is not a "real" bone, it has no corresponding node in the scene graph.
|
// 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.
|
// As far as the scene graph goes we support multiple root bones.
|
||||||
|
|
Loading…
Reference in a new issue