mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
Handle Deleted moved references (Bug #1613)
This commit is contained in:
parent
e666ddfe18
commit
6cd6578a88
@ -23,11 +23,14 @@ void Store<ESM::Cell>::handleMovedCellRefs(ESM::ESMReader& esm, ESM::Cell* cell)
|
|||||||
// We should not need to test for duplicates, as this part of the code is pre-cell merge.
|
// We should not need to test for duplicates, as this part of the code is pre-cell merge.
|
||||||
cell->mMovedRefs.push_back(cMRef);
|
cell->mMovedRefs.push_back(cMRef);
|
||||||
// But there may be duplicates here!
|
// But there may be duplicates here!
|
||||||
ESM::CellRefTracker::iterator iter = std::find(cellAlt->mLeasedRefs.begin(), cellAlt->mLeasedRefs.end(), ref.mRefNum);
|
if (!deleted)
|
||||||
if (iter == cellAlt->mLeasedRefs.end())
|
{
|
||||||
cellAlt->mLeasedRefs.push_back(ref);
|
ESM::CellRefTracker::iterator iter = std::find(cellAlt->mLeasedRefs.begin(), cellAlt->mLeasedRefs.end(), ref.mRefNum);
|
||||||
else
|
if (iter == cellAlt->mLeasedRefs.end())
|
||||||
*iter = ref;
|
cellAlt->mLeasedRefs.push_back(ref);
|
||||||
|
else
|
||||||
|
*iter = ref;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user