forked from teamnwah/openmw-tes3coop
Bug #1319: Fix references not coming from a content file incorrectly overwriting each other
This commit is contained in:
parent
e7a004824c
commit
136813a882
1 changed files with 11 additions and 8 deletions
|
@ -92,14 +92,17 @@ namespace
|
|||
if (!record)
|
||||
return;
|
||||
|
||||
for (typename MWWorld::CellRefList<T>::List::iterator iter (collection.mList.begin());
|
||||
iter!=collection.mList.end(); ++iter)
|
||||
if (iter->mRef.mRefNum==state.mRef.mRefNum)
|
||||
{
|
||||
// overwrite existing reference
|
||||
iter->load (state);
|
||||
return;
|
||||
}
|
||||
if (state.mRef.mRefNum.mContentFile != -1)
|
||||
{
|
||||
for (typename MWWorld::CellRefList<T>::List::iterator iter (collection.mList.begin());
|
||||
iter!=collection.mList.end(); ++iter)
|
||||
if (iter->mRef.mRefNum==state.mRef.mRefNum)
|
||||
{
|
||||
// overwrite existing reference
|
||||
iter->load (state);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// new reference
|
||||
MWWorld::LiveCellRef<T> ref (record);
|
||||
|
|
Loading…
Reference in a new issue