Ignore only CellRefs with preceding MVRF subrecord

MVRF subrecord means that only single following FRMR subrecord is moved not the
rest of subrecords.
dont-compose-content
elsid 4 years ago
parent cfdbd0d471
commit aec4e02417
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

@ -232,13 +232,18 @@ namespace ESM
if (!esm.hasMoreSubs()) if (!esm.hasMoreSubs())
return false; return false;
// NOTE: We should not need this check. It is a safety check until we have checked // MVRF are FRMR are present in pairs. MVRF indicates that following FRMR describes moved CellRef.
// more plugins, and how they treat these moved references. // This function has to skip all moved CellRefs therefore read all such pairs to ignored values.
if (esm.isNextSub("MVRF")) while (esm.isNextSub("MVRF"))
{ {
// skip rest of cell record (moved references), they are handled elsewhere MovedCellRef movedCellRef;
esm.skipRecord(); // skip MVRF, CNDT esm.getHT(movedCellRef.mRefNum.mIndex);
esm.getHNOT(movedCellRef.mTarget, "CNDT");
CellRef skippedCellRef;
if (!esm.peekNextSub("FRMR"))
return false; return false;
bool skippedDeleted;
skippedCellRef.load(esm, skippedDeleted);
} }
if (esm.peekNextSub("FRMR")) if (esm.peekNextSub("FRMR"))

Loading…
Cancel
Save