mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 22:15:32 +00:00
Simplify skipping moved references (thanks scrawl)
This commit is contained in:
parent
33c454e073
commit
5ae1554a75
1 changed files with 3 additions and 10 deletions
|
@ -177,17 +177,10 @@ bool Cell::getNextRef(ESMReader &esm, CellRef &ref, bool& deleted)
|
||||||
// NOTE: We should not need this check. It is a safety check until we have checked
|
// 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.
|
// more plugins, and how they treat these moved references.
|
||||||
if (esm.isNextSub("MVRF")) {
|
if (esm.isNextSub("MVRF")) {
|
||||||
esm.skipRecord(); // skip MVRF
|
// skip rest of cell record (moved references), they are handled elsewhere
|
||||||
esm.skipRecord(); // skip CNDT
|
esm.skipRecord(); // skip MVRF, CNDT
|
||||||
// That should be it, I haven't seen any other fields yet.
|
|
||||||
}
|
|
||||||
|
|
||||||
// If moved references are not handled then it is possible that CellRef::load() can lead
|
|
||||||
// to strange results because ESMReader::isNextSub("xxx") will always return false when
|
|
||||||
// there are no more subrecords. When moved references are handled properly by OpenCS
|
|
||||||
// below 2 lines can be removed.
|
|
||||||
if (!esm.hasMoreSubs())
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ref.load (esm);
|
ref.load (esm);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue