mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
Avoid a hack to initialize mIndex
This commit is contained in:
parent
b243ee6f74
commit
c7cedc4e5a
@ -18,10 +18,10 @@ void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool
|
||||
CellRef ref;
|
||||
ref.mNew = false;
|
||||
ESM::MovedCellRef mref;
|
||||
mref.mRefNum.mIndex = 0;
|
||||
bool isDeleted = false;
|
||||
|
||||
// hack to initialise mindex
|
||||
while (!(mref.mRefNum.mIndex = 0) && ESM::Cell::getNextRef(reader, ref, isDeleted, true, &mref))
|
||||
while (ESM::Cell::getNextRef(reader, ref, isDeleted, true, &mref))
|
||||
{
|
||||
// Keep mOriginalCell empty when in modified (as an indicator that the
|
||||
// original cell will always be equal the current cell).
|
||||
@ -60,6 +60,8 @@ void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool
|
||||
else
|
||||
ref.mCell = cell2.mId;
|
||||
|
||||
mref.mRefNum.mIndex = 0;
|
||||
|
||||
// ignore content file number
|
||||
std::map<ESM::RefNum, std::string>::iterator iter = cache.begin();
|
||||
for (; iter != cache.end(); ++iter)
|
||||
|
Loading…
Reference in New Issue
Block a user