mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-22 01:09:39 +00:00
Create entities and particle systems for hidden objects
They're set as (in)visible as appropriate.
This commit is contained in:
parent
f764f243d2
commit
95730cc127
1 changed files with 10 additions and 5 deletions
|
@ -1375,7 +1375,7 @@ class NIFMeshLoader : Ogre::ManualResourceLoader
|
||||||
ctrl = ctrl->next;
|
ctrl = ctrl->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(node->recType == Nif::RC_NiTriShape && !(flags&0x01)) // Not hidden
|
if(node->recType == Nif::RC_NiTriShape)
|
||||||
{
|
{
|
||||||
const Nif::NiTriShape *shape = static_cast<const Nif::NiTriShape*>(node);
|
const Nif::NiTriShape *shape = static_cast<const Nif::NiTriShape*>(node);
|
||||||
|
|
||||||
|
@ -1396,10 +1396,12 @@ class NIFMeshLoader : Ogre::ManualResourceLoader
|
||||||
mesh->setAutoBuildEdgeLists(false);
|
mesh->setAutoBuildEdgeLists(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
entities.mEntities.push_back(sceneMgr->createEntity(mesh));
|
Ogre::Entity *entity = sceneMgr->createEntity(mesh);
|
||||||
|
entity->setVisible(!(flags&0x01));
|
||||||
|
|
||||||
|
entities.mEntities.push_back(entity);
|
||||||
if(entities.mSkelBase)
|
if(entities.mSkelBase)
|
||||||
{
|
{
|
||||||
Ogre::Entity *entity = entities.mEntities.back();
|
|
||||||
if(entity->hasSkeleton())
|
if(entity->hasSkeleton())
|
||||||
entity->shareSkeletonInstanceWith(entities.mSkelBase);
|
entity->shareSkeletonInstanceWith(entities.mSkelBase);
|
||||||
else
|
else
|
||||||
|
@ -1407,13 +1409,16 @@ class NIFMeshLoader : Ogre::ManualResourceLoader
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if((node->recType == Nif::RC_NiAutoNormalParticles ||
|
if(node->recType == Nif::RC_NiAutoNormalParticles ||
|
||||||
node->recType == Nif::RC_NiRotatingParticles) && !(flags&0x01))
|
node->recType == Nif::RC_NiRotatingParticles)
|
||||||
{
|
{
|
||||||
Ogre::ParticleSystem *partsys = createParticleSystem(sceneMgr, entities.mSkelBase, node);
|
Ogre::ParticleSystem *partsys = createParticleSystem(sceneMgr, entities.mSkelBase, node);
|
||||||
if(partsys != NULL)
|
if(partsys != NULL)
|
||||||
|
{
|
||||||
|
partsys->setVisible(!(flags&0x01));
|
||||||
entities.mParticles.push_back(partsys);
|
entities.mParticles.push_back(partsys);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const Nif::NiNode *ninode = dynamic_cast<const Nif::NiNode*>(node);
|
const Nif::NiNode *ninode = dynamic_cast<const Nif::NiNode*>(node);
|
||||||
if(ninode)
|
if(ninode)
|
||||||
|
|
Loading…
Reference in a new issue