|
|
@ -92,14 +92,17 @@ namespace
|
|
|
|
if (!record)
|
|
|
|
if (!record)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
for (typename MWWorld::CellRefList<T>::List::iterator iter (collection.mList.begin());
|
|
|
|
if (state.mRef.mRefNum.mContentFile != -1)
|
|
|
|
iter!=collection.mList.end(); ++iter)
|
|
|
|
{
|
|
|
|
if (iter->mRef.mRefNum==state.mRef.mRefNum)
|
|
|
|
for (typename MWWorld::CellRefList<T>::List::iterator iter (collection.mList.begin());
|
|
|
|
{
|
|
|
|
iter!=collection.mList.end(); ++iter)
|
|
|
|
// overwrite existing reference
|
|
|
|
if (iter->mRef.mRefNum==state.mRef.mRefNum)
|
|
|
|
iter->load (state);
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
// overwrite existing reference
|
|
|
|
}
|
|
|
|
iter->load (state);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// new reference
|
|
|
|
// new reference
|
|
|
|
MWWorld::LiveCellRef<T> ref (record);
|
|
|
|
MWWorld::LiveCellRef<T> ref (record);
|
|
|
|