mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 20:45:32 +00:00
Only lower-case the model name
The skeleton name will already be lower-case
This commit is contained in:
parent
18389c7b04
commit
8ebf49a35b
2 changed files with 8 additions and 12 deletions
|
@ -1043,11 +1043,8 @@ NIFMeshLoader::LoaderMap NIFMeshLoader::sLoaders;
|
|||
typedef std::map<std::string,MeshPairList> MeshPairMap;
|
||||
static MeshPairMap sMeshPairMap;
|
||||
|
||||
MeshPairList NIFLoader::load(std::string name, std::string skelName, const std::string &group)
|
||||
MeshPairList NIFLoader::load(const std::string &name, const std::string &skelName, const std::string &group)
|
||||
{
|
||||
std::transform(name.begin(), name.end(), name.begin(), ::tolower);
|
||||
std::transform(skelName.begin(), skelName.end(), skelName.begin(), ::tolower);
|
||||
|
||||
MeshPairMap::const_iterator meshiter = sMeshPairMap.find(name+"@skel="+skelName);
|
||||
if(meshiter != sMeshPairMap.end())
|
||||
return meshiter->second;
|
||||
|
@ -1081,10 +1078,11 @@ MeshPairList NIFLoader::load(std::string name, std::string skelName, const std::
|
|||
return meshes;
|
||||
}
|
||||
|
||||
EntityList NIFLoader::createEntities(Ogre::SceneNode *parentNode, const std::string &name, const std::string &group)
|
||||
EntityList NIFLoader::createEntities(Ogre::SceneNode *parentNode, std::string name, const std::string &group)
|
||||
{
|
||||
EntityList entitylist;
|
||||
|
||||
std::transform(name.begin(), name.end(), name.begin(), ::tolower);
|
||||
MeshPairList meshes = load(name, name, group);
|
||||
if(meshes.size() == 0)
|
||||
return entitylist;
|
||||
|
@ -1124,11 +1122,11 @@ EntityList NIFLoader::createEntities(Ogre::SceneNode *parentNode, const std::str
|
|||
|
||||
EntityList NIFLoader::createEntities(Ogre::Entity *parent, const std::string &bonename,
|
||||
Ogre::SceneNode *parentNode,
|
||||
const std::string &name,
|
||||
const std::string &group)
|
||||
std::string name, const std::string &group)
|
||||
{
|
||||
EntityList entitylist;
|
||||
|
||||
std::transform(name.begin(), name.end(), name.begin(), ::tolower);
|
||||
MeshPairList meshes = load(name, parent->getMesh()->getSkeletonName(), group);
|
||||
if(meshes.size() == 0)
|
||||
return entitylist;
|
||||
|
|
|
@ -70,21 +70,19 @@ typedef std::vector< std::pair<std::string,std::string> > MeshPairList;
|
|||
*/
|
||||
class NIFLoader
|
||||
{
|
||||
static MeshPairList load(std::string name, std::string skelName, const std::string &group);
|
||||
static MeshPairList load(const std::string &name, const std::string &skelName, const std::string &group);
|
||||
|
||||
public:
|
||||
static EntityList createEntities(Ogre::Entity *parent, const std::string &bonename,
|
||||
Ogre::SceneNode *parentNode,
|
||||
const std::string &name,
|
||||
std::string name,
|
||||
const std::string &group="General");
|
||||
|
||||
static EntityList createEntities(Ogre::SceneNode *parentNode,
|
||||
const std::string &name,
|
||||
std::string name,
|
||||
const std::string &group="General");
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue