mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-25 03:40:40 +00:00
Load CellStore when an object is moved there
This commit is contained in:
parent
811df1e97b
commit
2301080c63
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
MWWorld::Ptr CellStore::moveTo(const Ptr &object, CellStore *cellToMoveTo)
|
||||
|
Loading…
x
Reference in New Issue
Block a user