diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index 439f6fa2d..d740dd7db 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -405,8 +405,12 @@ void NpcAnimation::runAnimation(float timepassed) void NpcAnimation::removeEntities(std::vector &entities) { + Ogre::SceneManager *sceneMgr = mInsert->getCreator(); for(size_t i = 0;i < entities.size();i++) + { mEntityList.mSkelBase->detachObjectFromBone(entities[i]); + sceneMgr->destroyEntity(entities[i]); + } entities.clear(); }