1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-12-12 17:13:07 +00:00

FIX: never serialize MVRF for refferences from the local plugin

This commit is contained in:
Dave Corley 2025-07-19 09:44:01 -07:00
parent 7d5a9a2e2f
commit dcac39aefd

View file

@ -304,6 +304,8 @@ void CSMDoc::WriteCellCollectionStage::writeReferences(
{
CSMWorld::CellRef refRecord = ref.get();
const bool isLocal = refRecord.mRefNum.mContentFile == 0;
// -1 is the current file, saved indices are 1-based
refRecord.mRefNum.mContentFile++;
@ -316,7 +318,8 @@ void CSMDoc::WriteCellCollectionStage::writeReferences(
}
ESM::RefId streamId = ESM::RefId::stringRefId(stream.str());
if ((refRecord.mOriginalCell.empty() ? refRecord.mCell : refRecord.mOriginalCell) != streamId && !interior)
if (!isLocal && (refRecord.mOriginalCell.empty() ? refRecord.mCell : refRecord.mOriginalCell) != streamId
&& !interior)
{
// An empty mOriginalCell is meant to indicate that it is the same as
// the current cell. It is possible that a moved ref is moved again.