1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00

Merge remote-tracking branch 'mikesc/bug586'

This commit is contained in:
Marc Zinnschlag 2013-03-07 20:48:58 +01:00
commit 17e406e58c

View File

@ -129,13 +129,14 @@ MWWorld::Ptr::CellStore *MWWorld::Cells::getExterior (int x, int y)
MWWorld::Ptr::CellStore *MWWorld::Cells::getInterior (const std::string& name)
{
std::map<std::string, Ptr::CellStore>::iterator result = mInteriors.find (name);
std::string lowerName = Misc::StringUtils::lowerCase(name);
std::map<std::string, Ptr::CellStore>::iterator result = mInteriors.find (lowerName);
if (result==mInteriors.end())
{
const ESM::Cell *cell = mStore.get<ESM::Cell>().find(name);
const ESM::Cell *cell = mStore.get<ESM::Cell>().find(lowerName);
result = mInteriors.insert (std::make_pair (name, Ptr::CellStore (cell))).first;
result = mInteriors.insert (std::make_pair (lowerName, Ptr::CellStore (cell))).first;
}
if (result->second.mState!=Ptr::CellStore::State_Loaded)