1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 01:23:53 +00:00

Remove an unneeded function

This commit is contained in:
Chris Robinson 2013-04-07 13:02:46 -07:00
parent 2362e920f3
commit 7494f90301
2 changed files with 3 additions and 19 deletions

View file

@ -50,8 +50,9 @@ const NpcAnimation::PartInfo NpcAnimation::sPartList[NpcAnimation::sPartListSize
NpcAnimation::~NpcAnimation()
{
Ogre::SceneManager *sceneMgr = mInsert->getCreator();
for(size_t i = 0;i < sPartListSize;i++)
removeObjects(mObjectParts[i]);
destroyObjectList(sceneMgr, mObjectParts[i]);
}
@ -374,22 +375,6 @@ Ogre::Vector3 NpcAnimation::runAnimation(float timepassed)
return ret;
}
void NpcAnimation::removeObjects(NifOgre::ObjectList &objects)
{
assert(&objects != &mObjectList);
Ogre::SceneManager *sceneMgr = mInsert->getCreator();
for(size_t i = 0;i < objects.mParticles.size();i++)
sceneMgr->destroyParticleSystem(objects.mParticles[i]);
for(size_t i = 0;i < objects.mEntities.size();i++)
sceneMgr->destroyEntity(objects.mEntities[i]);
objects.mControllers.clear();
objects.mCameras.clear();
objects.mParticles.clear();
objects.mEntities.clear();
objects.mSkelBase = NULL;
}
void NpcAnimation::removeIndividualPart(int type)
{
mPartPriorities[type] = 0;
@ -399,7 +384,7 @@ void NpcAnimation::removeIndividualPart(int type)
{
if(type == sPartList[i].type)
{
removeObjects(mObjectParts[i]);
destroyObjectList(mInsert->getCreator(), mObjectParts[i]);
break;
}
}

View file

@ -64,7 +64,6 @@ private:
void updateParts(bool forceupdate = false);
void removeObjects(NifOgre::ObjectList &objects);
void removeIndividualPart(int type);
void reserveIndividualPart(int type, int group, int priority);