mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-28 20:36:42 +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
2 changed files with 5 additions and 2 deletions
|
@ -807,6 +807,7 @@ public:
|
||||||
Ogre::MeshManager &meshMgr = Ogre::MeshManager::getSingleton();
|
Ogre::MeshManager &meshMgr = Ogre::MeshManager::getSingleton();
|
||||||
std::string fullname = mName+"@"+shape->name;
|
std::string fullname = mName+"@"+shape->name;
|
||||||
|
|
||||||
|
std::transform(fullname.begin(), fullname.end(), fullname.begin(), ::tolower);
|
||||||
Ogre::MeshPtr mesh = meshMgr.getByName(fullname);
|
Ogre::MeshPtr mesh = meshMgr.getByName(fullname);
|
||||||
if(mesh.isNull())
|
if(mesh.isNull())
|
||||||
{
|
{
|
||||||
|
@ -842,10 +843,12 @@ public:
|
||||||
NIFMeshLoader::LoaderMap NIFMeshLoader::sLoaders;
|
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;
|
MeshPairList meshes;
|
||||||
|
|
||||||
|
std::transform(name.begin(), name.end(), name.begin(), ::tolower);
|
||||||
|
|
||||||
Nif::NIFFile nif(name);
|
Nif::NIFFile nif(name);
|
||||||
if (nif.numRecords() < 1)
|
if (nif.numRecords() < 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,7 +87,7 @@ typedef std::vector< std::pair<Ogre::MeshPtr,std::string> > MeshPairList;
|
||||||
*/
|
*/
|
||||||
class NIFLoader
|
class NIFLoader
|
||||||
{
|
{
|
||||||
static MeshPairList load(const std::string &name, const std::string &group);
|
static MeshPairList load(std::string name, const std::string &group);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static EntityList createEntities(Ogre::Entity *parent, const std::string &bonename,
|
static EntityList createEntities(Ogre::Entity *parent, const std::string &bonename,
|
||||||
|
|
Loading…
Reference in a new issue