mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:23:51 +00:00
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)
|
void CellStore::moveFrom(const Ptr &object, CellStore *from)
|
||||||
{
|
{
|
||||||
|
if (mState != State_Loaded)
|
||||||
|
load();
|
||||||
|
|
||||||
mHasState = true;
|
mHasState = true;
|
||||||
MovedRefTracker::iterator found = mMovedToAnotherCell.find(object.getBase());
|
MovedRefTracker::iterator found = mMovedToAnotherCell.find(object.getBase());
|
||||||
if (found != mMovedToAnotherCell.end())
|
if (found != mMovedToAnotherCell.end())
|
||||||
|
@ -196,14 +199,7 @@ namespace MWWorld
|
||||||
{
|
{
|
||||||
mMovedHere.insert(std::make_pair(object.getBase(), from));
|
mMovedHere.insert(std::make_pair(object.getBase(), from));
|
||||||
}
|
}
|
||||||
|
updateMergedRefs();
|
||||||
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)
|
MWWorld::Ptr CellStore::moveTo(const Ptr &object, CellStore *cellToMoveTo)
|
||||||
|
|
Loading…
Reference in a new issue