keep original cell field empty, if reference is in modified

This commit is contained in:
Marc Zinnschlag 2015-01-10 12:35:59 +01:00
parent e32402a040
commit 320b994aef

View file

@ -23,10 +23,13 @@ void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool
while (ESM::Cell::getNextRef (reader, ref, deleted)) while (ESM::Cell::getNextRef (reader, ref, deleted))
{ {
ref.mOriginalCell = cell2.mId; // Keep mOriginalCell empty when in modified (as an indicator that the
// original cell will always be equal the current cell).
ref.mOriginalCell = base ? cell2.mId : "";
if (cell.get().isExterior()) if (cell.get().isExterior())
{ {
// ignoring moved references sub-record; instead calculate cell from coordinates // ignoring moved references sub-record; instead calculate cell from coordinates
std::pair<int, int> index = ref.getCellIndex(); std::pair<int, int> index = ref.getCellIndex();