1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 11:23:51 +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:
Chris Robinson 2012-07-18 15:27:33 -07:00
parent e8ff304562
commit 2890904fb5
2 changed files with 5 additions and 2 deletions

View file

@ -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)
{

View file

@ -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,