mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
Remove mPersistentExteriors
index; fix incorrect Rec_Persistent flag check.
This commit is contained in:
parent
8976a1594f
commit
01c410d6b1
2 changed files with 6 additions and 9 deletions
|
@ -1212,16 +1212,15 @@ namespace MWWorld
|
|||
|
||||
void Store<ESM4::Cell>::insertCell(ESM4::Cell* cellPtr)
|
||||
{
|
||||
// Do not index exterior cells with Rec_Persistent flag because they are not real cells.
|
||||
// References from these cells are merged into normal cells.
|
||||
if (cellPtr->isExterior() && cellPtr->mFlags & ESM4::Rec_Persistent)
|
||||
return;
|
||||
|
||||
if (!cellPtr->mEditorId.empty())
|
||||
mCellNameIndex[cellPtr->mEditorId] = cellPtr;
|
||||
if (cellPtr->isExterior())
|
||||
{
|
||||
ESM::ExteriorCellLocation cellindex = { cellPtr->mX, cellPtr->mY, cellPtr->mParent };
|
||||
if (cellPtr->mCellFlags & ESM4::Rec_Persistent)
|
||||
mPersistentExteriors[cellindex] = cellPtr;
|
||||
else
|
||||
mExteriors[cellindex] = cellPtr;
|
||||
}
|
||||
mExteriors[ESM::ExteriorCellLocation(cellPtr->mX, cellPtr->mY, cellPtr->mParent)] = cellPtr;
|
||||
}
|
||||
|
||||
void Store<ESM4::Cell>::clearDynamic()
|
||||
|
|
|
@ -291,9 +291,7 @@ namespace MWWorld
|
|||
{
|
||||
std::unordered_map<std::string, ESM4::Cell*, Misc::StringUtils::CiHash, Misc::StringUtils::CiEqual>
|
||||
mCellNameIndex;
|
||||
|
||||
std::unordered_map<ESM::ExteriorCellLocation, ESM4::Cell*> mExteriors;
|
||||
std::unordered_map<ESM::ExteriorCellLocation, ESM4::Cell*> mPersistentExteriors;
|
||||
|
||||
public:
|
||||
const ESM4::Cell* searchCellName(std::string_view) const;
|
||||
|
|
Loading…
Reference in a new issue