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

Merge remote-tracking branch 'origin/master'

This commit is contained in:
Marc Zinnschlag 2015-09-19 11:27:35 +02:00
commit 1566f3568d

View file

@ -935,8 +935,10 @@ namespace MWRender
void Animation::setObjectRoot(const std::string &model, bool forceskeleton, bool baseonly, bool isCreature)
{
osg::ref_ptr<osg::StateSet> previousStateset;
if (mObjectRoot)
{
previousStateset = mObjectRoot->getStateSet();
mObjectRoot->getParent(0)->removeChild(mObjectRoot);
}
mObjectRoot = NULL;
@ -961,6 +963,9 @@ namespace MWRender
mObjectRoot = newObjectRoot;
}
if (previousStateset)
mObjectRoot->setStateSet(previousStateset);
if (baseonly)
{
RemoveDrawableVisitor removeDrawableVisitor;