diff --git a/apps/openmw/mwrender/exterior.cpp b/apps/openmw/mwrender/exterior.cpp index 3171e14555..3a17357bdd 100644 --- a/apps/openmw/mwrender/exterior.cpp +++ b/apps/openmw/mwrender/exterior.cpp @@ -31,17 +31,14 @@ float ExteriorCellRender::lightQuadraticRadiusMult = 1; bool ExteriorCellRender::lightOutQuadInLin = false; +int ExteriorCellRender::uniqueID = 0; + ExteriorCellRender::ExteriorCellRender(ESMS::CellStore &_cell, MWWorld::Environment& environment, MWScene &_scene) : mCell(_cell), mEnvironment (environment), mScene(_scene), mBase(NULL), mInsert(NULL), mAmbientMode (0) { - //char a = mCell.cell->name; - //char *rand1; - srand (150); - //itoa(rand(),rand1,10); - int a; - Ogre::StringConverter::toString(rand()); - sg = Ogre::Root::getSingleton().getSceneManagerIterator().getNext()->createStaticGeometry( Ogre::StringConverter::toString(a)); + uniqueID = uniqueID +1; + sg = Ogre::Root::getSingleton().getSceneManagerIterator().getNext()->createStaticGeometry( "sg" + Ogre::StringConverter::toString(uniqueID)); } diff --git a/apps/openmw/mwrender/exterior.hpp b/apps/openmw/mwrender/exterior.hpp index f8cef45fab..4de421f445 100644 --- a/apps/openmw/mwrender/exterior.hpp +++ b/apps/openmw/mwrender/exterior.hpp @@ -124,6 +124,8 @@ namespace MWRender /// Remove the reference with the given handle permanently from the scene. virtual void deleteObject (const std::string& handle); + + static int uniqueID; }; }