Fix bug of Animation::mSkeleton not being assigned

This bug resulted in deactivating a Skeleton not working properly for creatures (that are out of processing range), therefore reduced performance.
This commit is contained in:
scrawl 2017-09-01 18:24:48 +02:00
parent 7a79ebb713
commit 132ac6001b

View file

@ -1192,6 +1192,9 @@ namespace MWRender
mObjectRoot->addChild(created);
mInsert->addChild(mObjectRoot);
}
osg::ref_ptr<SceneUtil::Skeleton> skel = dynamic_cast<SceneUtil::Skeleton*>(mObjectRoot.get());
if (skel)
mSkeleton = skel.get();
}
else
{