mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
Destroy the scene node we create
This commit is contained in:
parent
0458fd5531
commit
2b2101958d
1 changed files with 3 additions and 2 deletions
|
@ -74,8 +74,7 @@ Animation::Animation(const MWWorld::Ptr &ptr, Ogre::SceneNode *node)
|
||||||
{
|
{
|
||||||
for(size_t i = 0;i < sNumGroups;i++)
|
for(size_t i = 0;i < sNumGroups;i++)
|
||||||
mAnimationValuePtr[i].bind(OGRE_NEW AnimationValue(this));
|
mAnimationValuePtr[i].bind(OGRE_NEW AnimationValue(this));
|
||||||
mInsert = node ? node->createChildSceneNode() :
|
mInsert = node->createChildSceneNode();
|
||||||
mPtr.getRefData().getBaseNode()->createChildSceneNode();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Animation::~Animation()
|
Animation::~Animation()
|
||||||
|
@ -86,6 +85,8 @@ Animation::~Animation()
|
||||||
|
|
||||||
Ogre::SceneManager *sceneMgr = mInsert->getCreator();
|
Ogre::SceneManager *sceneMgr = mInsert->getCreator();
|
||||||
destroyObjectList(sceneMgr, mObjectRoot);
|
destroyObjectList(sceneMgr, mObjectRoot);
|
||||||
|
|
||||||
|
sceneMgr->destroySceneNode(mInsert);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue