|
|
|
@ -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.
|
|
|
|
|