forked from teamnwah/openmw-tes3coop
Load CellStore when an object is moved there
This commit is contained in:
parent
811df1e97b
commit
2301080c63
1 changed files with 4 additions and 8 deletions
|
@ -184,6 +184,9 @@ namespace MWWorld
|
|||
|
||||
void CellStore::moveFrom(const Ptr &object, CellStore *from)
|
||||
{
|
||||
if (mState != State_Loaded)
|
||||
load();
|
||||
|
||||
mHasState = true;
|
||||
MovedRefTracker::iterator found = mMovedToAnotherCell.find(object.getBase());
|
||||
if (found != mMovedToAnotherCell.end())
|
||||
|
@ -196,14 +199,7 @@ namespace MWWorld
|
|||
{
|
||||
mMovedHere.insert(std::make_pair(object.getBase(), from));
|
||||
}
|
||||
|
||||
if (mState == State_Loaded)
|
||||
updateMergedRefs();
|
||||
else if (mState == State_Preloaded)
|
||||
{
|
||||
mIds.push_back(object.getCellRef().getRefId());
|
||||
std::sort(mIds.begin(), mIds.end());
|
||||
}
|
||||
updateMergedRefs();
|
||||
}
|
||||
|
||||
MWWorld::Ptr CellStore::moveTo(const Ptr &object, CellStore *cellToMoveTo)
|
||||
|
|
Loading…
Reference in a new issue