keep original cell field empty, if reference is in modified

moveref
Marc Zinnschlag 10 years ago
parent e32402a040
commit 320b994aef

@ -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();

Loading…
Cancel
Save