some cleanup

actorid
Marc Zinnschlag 14 years ago
parent bed45a936e
commit 7d2956329a

@ -38,7 +38,7 @@ ExteriorCellRender::ExteriorCellRender(ESMS::CellStore<MWWorld::RefData> &_cell,
: mCell(_cell), mEnvironment (environment), mScene(_scene), mBase(NULL), mInsert(NULL), mAmbientMode (0)
{
uniqueID = uniqueID +1;
sg = Ogre::Root::getSingleton().getSceneManagerIterator().getNext()->createStaticGeometry( "sg" + Ogre::StringConverter::toString(uniqueID));
sg = mScene.getMgr()->createStaticGeometry( "sg" + Ogre::StringConverter::toString(uniqueID));
}
@ -400,13 +400,13 @@ void ExteriorCellRender::destroy()
mScene.getMgr()->destroySceneNode(mBase);
}
mBase = NULL;
std::cout << "destroy";
if (sg)
{
Ogre::Root::getSingleton().getSceneManagerIterator().getNext()->destroyStaticGeometry(sg);
sg = 0;
}
mBase = 0;
if (sg)
{
mScene.getMgr()->destroyStaticGeometry (sg);
sg = 0;
}
}
// Switch through lighting modes.

@ -284,7 +284,6 @@ namespace MWWorld
removeScripts (iter->first);
mEnvironment.mMechanicsManager->dropActors (iter->first);
iter->second->destroy();
mEnvironment.mSoundManager->stopSound (iter->first);
delete iter->second;
mActiveCells.erase (iter);

Loading…
Cancel
Save