mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-28 23:36:42 +00:00
Don't load data for hidden meshes
This commit is contained in:
parent
a539e98274
commit
75ce10c580
1 changed files with 12 additions and 2 deletions
|
@ -755,6 +755,13 @@ public:
|
||||||
Ogre::Mesh *mesh = dynamic_cast<Ogre::Mesh*>(resource);
|
Ogre::Mesh *mesh = dynamic_cast<Ogre::Mesh*>(resource);
|
||||||
assert(mesh && "Attempting to load a mesh into a non-mesh resource!");
|
assert(mesh && "Attempting to load a mesh into a non-mesh resource!");
|
||||||
|
|
||||||
|
if(!mShapeName.length())
|
||||||
|
{
|
||||||
|
if(mHasSkel)
|
||||||
|
mesh->setSkeletonName(mName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Nif::NIFFile nif(mName);
|
Nif::NIFFile nif(mName);
|
||||||
Nif::Node *node = dynamic_cast<Nif::Node*>(nif.getRecord(0));
|
Nif::Node *node = dynamic_cast<Nif::Node*>(nif.getRecord(0));
|
||||||
findTriShape(mesh, node);
|
findTriShape(mesh, node);
|
||||||
|
@ -778,8 +785,11 @@ public:
|
||||||
{
|
{
|
||||||
NIFMeshLoader *loader = &sLoaders[fullname];
|
NIFMeshLoader *loader = &sLoaders[fullname];
|
||||||
*loader = *this;
|
*loader = *this;
|
||||||
loader->mShapeName = shape->name;
|
if(!(flags&0x01)) // Not hidden
|
||||||
loader->mMaterialName = NIFMaterialLoader::getMaterial(shape, fullname, mGroup);
|
{
|
||||||
|
loader->mShapeName = shape->name;
|
||||||
|
loader->mMaterialName = NIFMaterialLoader::getMaterial(shape, fullname, mGroup);
|
||||||
|
}
|
||||||
|
|
||||||
mesh = meshMgr.createManual(fullname, mGroup, loader);
|
mesh = meshMgr.createManual(fullname, mGroup, loader);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue