mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:53:50 +00:00
Merge pull request #2762 from akortunov/warnfix
Avoid a hack to initialize mIndex in the editor
This commit is contained in:
commit
9712925ba3
1 changed files with 4 additions and 2 deletions
|
@ -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 a new issue