mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +00:00
Use lowercase names for the mesh and skeleton resources
To reduce the risk of duplicates due to different capitalizations.
This commit is contained in:
parent
e8ff304562
commit
2890904fb5
@ -807,6 +807,7 @@ public:
|
||||
Ogre::MeshManager &meshMgr = Ogre::MeshManager::getSingleton();
|
||||
std::string fullname = mName+"@"+shape->name;
|
||||
|
||||
std::transform(fullname.begin(), fullname.end(), fullname.begin(), ::tolower);
|
||||
Ogre::MeshPtr mesh = meshMgr.getByName(fullname);
|
||||
if(mesh.isNull())
|
||||
{
|
||||
@ -842,10 +843,12 @@ public:
|
||||
NIFMeshLoader::LoaderMap NIFMeshLoader::sLoaders;
|
||||
|
||||
|
||||
MeshPairList NIFLoader::load(const std::string &name, const std::string &group)
|
||||
MeshPairList NIFLoader::load(std::string name, const std::string &group)
|
||||
{
|
||||
MeshPairList meshes;
|
||||
|
||||
std::transform(name.begin(), name.end(), name.begin(), ::tolower);
|
||||
|
||||
Nif::NIFFile nif(name);
|
||||
if (nif.numRecords() < 1)
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ typedef std::vector< std::pair<Ogre::MeshPtr,std::string> > MeshPairList;
|
||||
*/
|
||||
class NIFLoader
|
||||
{
|
||||
static MeshPairList load(const std::string &name, const std::string &group);
|
||||
static MeshPairList load(std::string name, const std::string &group);
|
||||
|
||||
public:
|
||||
static EntityList createEntities(Ogre::Entity *parent, const std::string &bonename,
|
||||
|
Loading…
x
Reference in New Issue
Block a user