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