mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-04 14:45:36 +00:00
Merge branch 'masterindexloadfix' into 'master'
[OpenMW-CS] Load master index from refId to mContentFile See merge request OpenMW/openmw!445
This commit is contained in:
commit
0e5af74a2f
1 changed files with 4 additions and 2 deletions
|
@ -64,10 +64,12 @@ void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool
|
||||||
|
|
||||||
// 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();
|
||||||
ref.mRefNum.mIndex = ref.mRefNum.mIndex & 0x00ffffff;
|
unsigned int thisIndex = ref.mRefNum.mIndex & 0x00ffffff;
|
||||||
|
if (ref.mRefNum.mContentFile != -1 && !base) ref.mRefNum.mContentFile = ref.mRefNum.mIndex >> 24;
|
||||||
|
|
||||||
for (; iter != cache.end(); ++iter)
|
for (; iter != cache.end(); ++iter)
|
||||||
{
|
{
|
||||||
if (ref.mRefNum.mIndex == iter->first.mIndex)
|
if (thisIndex == iter->first.mIndex)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue