1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:23:51 +00:00

static Objects goes inside the static geometry

This commit is contained in:
gugus 2011-05-23 19:39:10 +02:00
parent cd79df1d8b
commit 4546ca3863
2 changed files with 15 additions and 7 deletions

View file

@ -50,6 +50,8 @@ void ExteriorCellRender::insertBegin (ESM::CellRef &ref, bool static_)
{
assert (!mInsert);
isStatic = static_;
// Create and place scene node for this object
mInsert = mBase->createChildSceneNode();
@ -216,11 +218,16 @@ void ExteriorCellRender::insertMesh(const std::string &mesh)
NIFLoader::load(mesh);
Entity *ent = mScene.getMgr()->createEntity(mesh);
if(!isStatic)
{
mInsert->attachObject(ent);
/*sg->addEntity(ent,mInsert->_getDerivedPosition(),mInsert->_getDerivedOrientation(),mInsert->_getDerivedScale());
sg->setRegionDimensions(Ogre::Vector3(100000,10000,100000));*/
}
else
{
sg->addEntity(ent,mInsert->_getDerivedPosition(),mInsert->_getDerivedOrientation(),mInsert->_getDerivedScale());
sg->setRegionDimensions(Ogre::Vector3(100000,10000,100000));
}
if (mInsertMesh.empty())
mInsertMesh = mesh;
}

View file

@ -59,6 +59,7 @@ namespace MWRender
//the static geometry
Ogre::StaticGeometry *sg;
bool isStatic;
// 0 normal, 1 more bright, 2 max
int mAmbientMode;