mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 10:39:42 +00:00
Ignore only CellRefs with preceding MVRF subrecord
MVRF subrecord means that only single following FRMR subrecord is moved not the rest of subrecords.
This commit is contained in:
parent
cfdbd0d471
commit
aec4e02417
1 changed files with 11 additions and 6 deletions
|
@ -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"))
|
||||
// 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"))
|
||||
{
|
||||
// skip rest of cell record (moved references), they are handled elsewhere
|
||||
esm.skipRecord(); // skip MVRF, CNDT
|
||||
return false;
|
||||
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…
Reference in a new issue