mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 07:23:54 +00:00
Remove an unneeded function
This commit is contained in:
parent
2362e920f3
commit
7494f90301
2 changed files with 3 additions and 19 deletions
|
@ -50,8 +50,9 @@ const NpcAnimation::PartInfo NpcAnimation::sPartList[NpcAnimation::sPartListSize
|
||||||
|
|
||||||
NpcAnimation::~NpcAnimation()
|
NpcAnimation::~NpcAnimation()
|
||||||
{
|
{
|
||||||
|
Ogre::SceneManager *sceneMgr = mInsert->getCreator();
|
||||||
for(size_t i = 0;i < sPartListSize;i++)
|
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;
|
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)
|
void NpcAnimation::removeIndividualPart(int type)
|
||||||
{
|
{
|
||||||
mPartPriorities[type] = 0;
|
mPartPriorities[type] = 0;
|
||||||
|
@ -399,7 +384,7 @@ void NpcAnimation::removeIndividualPart(int type)
|
||||||
{
|
{
|
||||||
if(type == sPartList[i].type)
|
if(type == sPartList[i].type)
|
||||||
{
|
{
|
||||||
removeObjects(mObjectParts[i]);
|
destroyObjectList(mInsert->getCreator(), mObjectParts[i]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,6 @@ private:
|
||||||
|
|
||||||
void updateParts(bool forceupdate = false);
|
void updateParts(bool forceupdate = false);
|
||||||
|
|
||||||
void removeObjects(NifOgre::ObjectList &objects);
|
|
||||||
void removeIndividualPart(int type);
|
void removeIndividualPart(int type);
|
||||||
void reserveIndividualPart(int type, int group, int priority);
|
void reserveIndividualPart(int type, int group, int priority);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue