mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-27 12:40:25 +00:00
Merge branch 'morecicells' into 'master'
Fix more case issues with cells See merge request OpenMW/openmw!2648
This commit is contained in:
commit
0f9bb71534
1 changed files with 3 additions and 3 deletions
|
@ -233,15 +233,15 @@ const ESM::Cell* MWWorld::WorldModel::getESMCellByName(std::string_view name)
|
||||||
// treat "Wilderness" like an empty string
|
// treat "Wilderness" like an empty string
|
||||||
static const std::string& defaultName
|
static const std::string& defaultName
|
||||||
= mStore.get<ESM::GameSetting>().find("sDefaultCellname")->mValue.getString();
|
= mStore.get<ESM::GameSetting>().find("sDefaultCellname")->mValue.getString();
|
||||||
if (name == defaultName)
|
if (Misc::StringUtils::ciEqual(name, defaultName))
|
||||||
cell = mStore.get<ESM::Cell>().searchExtByName("");
|
cell = mStore.get<ESM::Cell>().searchExtByName({});
|
||||||
}
|
}
|
||||||
if (!cell)
|
if (!cell)
|
||||||
{
|
{
|
||||||
// now check for regions
|
// now check for regions
|
||||||
for (const ESM::Region& region : mStore.get<ESM::Region>())
|
for (const ESM::Region& region : mStore.get<ESM::Region>())
|
||||||
{
|
{
|
||||||
if (name == region.mName)
|
if (Misc::StringUtils::ciEqual(name, region.mName))
|
||||||
{
|
{
|
||||||
cell = mStore.get<ESM::Cell>().searchExtByRegion(region.mId);
|
cell = mStore.get<ESM::Cell>().searchExtByRegion(region.mId);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue