mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-01 09:45:33 +00:00
Merge branch '#5509_invisibility_fix_round_2' into 'master'
Should resolve the original cause of #5509 See merge request OpenMW/openmw!256
This commit is contained in:
commit
08469af742
1 changed files with 9 additions and 5 deletions
|
@ -1481,10 +1481,12 @@ namespace MWRender
|
|||
void Animation::setObjectRoot(const std::string &model, bool forceskeleton, bool baseonly, bool isCreature)
|
||||
{
|
||||
osg::ref_ptr<osg::StateSet> previousStateset;
|
||||
osg::ref_ptr<osg::Callback> previousCullCallback;
|
||||
if (mObjectRoot)
|
||||
{
|
||||
previousCullCallback = mObjectRoot->getCullCallback();
|
||||
if (mLightListCallback)
|
||||
mObjectRoot->removeCullCallback(mLightListCallback);
|
||||
if (mTransparencyUpdater)
|
||||
mObjectRoot->removeCullCallback(mTransparencyUpdater);
|
||||
previousStateset = mObjectRoot->getStateSet();
|
||||
mObjectRoot->getParent(0)->removeChild(mObjectRoot);
|
||||
}
|
||||
|
@ -1573,9 +1575,11 @@ namespace MWRender
|
|||
removeTriBipVisitor.remove();
|
||||
}
|
||||
|
||||
if (!previousCullCallback)
|
||||
previousCullCallback = mLightListCallback;
|
||||
mObjectRoot->setCullCallback(previousCullCallback);
|
||||
if (!mLightListCallback)
|
||||
mLightListCallback = new SceneUtil::LightListCallback;
|
||||
mObjectRoot->addCullCallback(mLightListCallback);
|
||||
if (mTransparencyUpdater)
|
||||
mObjectRoot->addCullCallback(mTransparencyUpdater);
|
||||
}
|
||||
|
||||
osg::Group* Animation::getObjectRoot()
|
||||
|
|
Loading…
Reference in a new issue