forked from teamnwah/openmw-tes3coop
Destroy entities removed from the NPC
This commit is contained in:
parent
a32740cf5e
commit
4109d0d923
1 changed files with 4 additions and 0 deletions
|
@ -405,8 +405,12 @@ void NpcAnimation::runAnimation(float timepassed)
|
||||||
|
|
||||||
void NpcAnimation::removeEntities(std::vector<Ogre::Entity*> &entities)
|
void NpcAnimation::removeEntities(std::vector<Ogre::Entity*> &entities)
|
||||||
{
|
{
|
||||||
|
Ogre::SceneManager *sceneMgr = mInsert->getCreator();
|
||||||
for(size_t i = 0;i < entities.size();i++)
|
for(size_t i = 0;i < entities.size();i++)
|
||||||
|
{
|
||||||
mEntityList.mSkelBase->detachObjectFromBone(entities[i]);
|
mEntityList.mSkelBase->detachObjectFromBone(entities[i]);
|
||||||
|
sceneMgr->destroyEntity(entities[i]);
|
||||||
|
}
|
||||||
entities.clear();
|
entities.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue