mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-30 13:57:59 +03:00
build external cell names from name of region instead of from internal region id
This commit is contained in:
parent
db2b238328
commit
814d721e33
2 changed files with 16 additions and 4 deletions
|
@ -698,9 +698,19 @@ namespace MWWorld
|
|||
return cell;
|
||||
|
||||
// didn't work -> now check for regions
|
||||
if (mStore.regions.search (cellName))
|
||||
if (const ESM::Cell *cell = mStore.cells.searchExtByRegion (cellName))
|
||||
return cell;
|
||||
std::string cellName2 = ESMS::RecListT<ESM::Region>::toLower (cellName);
|
||||
|
||||
for (ESMS::RecListT<ESM::Region>::MapType::const_iterator iter (mStore.regions.list.begin());
|
||||
iter!=mStore.regions.list.end(); ++iter)
|
||||
{
|
||||
if (ESMS::RecListT<ESM::Region>::toLower (iter->second.name)==cellName2)
|
||||
{
|
||||
if (const ESM::Cell *cell = mStore.cells.searchExtByRegion (iter->first))
|
||||
return cell;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue