1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-10-17 02:46:34 +00:00

FIX: Do not attempt to bump refNums during savingStages

This commit is contained in:
Dave Corley 2025-07-13 05:10:43 -07:00
parent 42109fc811
commit 85fdf2011a

View file

@ -316,13 +316,7 @@ void CSMDoc::WriteCellCollectionStage::writeReferences(
}
ESM::RefId streamId = ESM::RefId::stringRefId(stream.str());
if (refRecord.mNew || refRecord.mRefNum.mIndex == 0
|| (!interior && ref.mState == CSMWorld::RecordBase::State_ModifiedOnly && refRecord.mCell != streamId))
{
refRecord.mRefNum.mIndex = newRefNum++;
}
else if ((refRecord.mOriginalCell.empty() ? refRecord.mCell : refRecord.mOriginalCell) != streamId
&& !interior)
if ((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.