mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Don't load data for hidden meshes
This commit is contained in:
parent
a539e98274
commit
75ce10c580
@ -755,6 +755,13 @@ public:
|
||||
Ogre::Mesh *mesh = dynamic_cast<Ogre::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::Node *node = dynamic_cast<Nif::Node*>(nif.getRecord(0));
|
||||
findTriShape(mesh, node);
|
||||
@ -778,8 +785,11 @@ public:
|
||||
{
|
||||
NIFMeshLoader *loader = &sLoaders[fullname];
|
||||
*loader = *this;
|
||||
loader->mShapeName = shape->name;
|
||||
loader->mMaterialName = NIFMaterialLoader::getMaterial(shape, fullname, mGroup);
|
||||
if(!(flags&0x01)) // Not hidden
|
||||
{
|
||||
loader->mShapeName = shape->name;
|
||||
loader->mMaterialName = NIFMaterialLoader::getMaterial(shape, fullname, mGroup);
|
||||
}
|
||||
|
||||
mesh = meshMgr.createManual(fullname, mGroup, loader);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user