forked from teamnwah/openmw-tes3coop
Fix name/filter comparison
This commit is contained in:
parent
d8cb685543
commit
4035d7370e
1 changed files with 8 additions and 2 deletions
|
@ -25,6 +25,8 @@
|
||||||
|
|
||||||
#include "ogre_nif_loader.hpp"
|
#include "ogre_nif_loader.hpp"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include <OgreMaterialManager.h>
|
#include <OgreMaterialManager.h>
|
||||||
#include <OgreMeshManager.h>
|
#include <OgreMeshManager.h>
|
||||||
#include <OgreHardwareBufferManager.h>
|
#include <OgreHardwareBufferManager.h>
|
||||||
|
@ -1080,6 +1082,11 @@ EntityList NIFLoader::createEntities(Ogre::SceneNode *parent, const std::string
|
||||||
return entitylist;
|
return entitylist;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool checklow(const char &a, const char &b)
|
||||||
|
{
|
||||||
|
return ::tolower(a) == ::tolower(b);
|
||||||
|
}
|
||||||
|
|
||||||
EntityList NIFLoader::createEntities(Ogre::Entity *parent, const std::string &bonename,
|
EntityList NIFLoader::createEntities(Ogre::Entity *parent, const std::string &bonename,
|
||||||
Ogre::SceneNode *parentNode,
|
Ogre::SceneNode *parentNode,
|
||||||
const std::string &name,
|
const std::string &name,
|
||||||
|
@ -1099,8 +1106,7 @@ EntityList NIFLoader::createEntities(Ogre::Entity *parent, const std::string &bo
|
||||||
if(ent->hasSkeleton())
|
if(ent->hasSkeleton())
|
||||||
{
|
{
|
||||||
if(meshes[i].second.length() < filter.length() ||
|
if(meshes[i].second.length() < filter.length() ||
|
||||||
!boost::algorithm::lexicographical_compare(meshes[i].second.substr(0, filter.length()),
|
std::mismatch(filter.begin(), filter.end(), meshes[i].second.begin(), checklow).first != filter.end())
|
||||||
filter, boost::algorithm::is_iequal()))
|
|
||||||
{
|
{
|
||||||
sceneMgr->destroyEntity(ent);
|
sceneMgr->destroyEntity(ent);
|
||||||
meshes.erase(meshes.begin()+i);
|
meshes.erase(meshes.begin()+i);
|
||||||
|
|
Loading…
Reference in a new issue