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

Loading…
Cancel
Save