From 320b994aef7ed7f0df3987c4ffc909aa287e9059 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sat, 10 Jan 2015 12:35:59 +0100 Subject: [PATCH] keep original cell field empty, if reference is in modified --- apps/opencs/model/world/refcollection.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/opencs/model/world/refcollection.cpp b/apps/opencs/model/world/refcollection.cpp index 19dfae57d..dcb295626 100644 --- a/apps/opencs/model/world/refcollection.cpp +++ b/apps/opencs/model/world/refcollection.cpp @@ -23,10 +23,13 @@ void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool 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()) { + // ignoring moved references sub-record; instead calculate cell from coordinates std::pair index = ref.getCellIndex();