|
|
|
@ -3,8 +3,12 @@
|
|
|
|
|
|
|
|
|
|
#include <components/esm/objectstate.hpp>
|
|
|
|
|
|
|
|
|
|
#include "../mwbase/environment.hpp"
|
|
|
|
|
#include "../mwbase/world.hpp"
|
|
|
|
|
|
|
|
|
|
#include "ptr.hpp"
|
|
|
|
|
#include "class.hpp"
|
|
|
|
|
#include "esmstore.hpp"
|
|
|
|
|
|
|
|
|
|
void MWWorld::LiveCellRefBase::loadImp (const ESM::ObjectState& state)
|
|
|
|
|
{
|
|
|
|
@ -14,7 +18,13 @@ void MWWorld::LiveCellRefBase::loadImp (const ESM::ObjectState& state)
|
|
|
|
|
Ptr ptr (this);
|
|
|
|
|
|
|
|
|
|
if (state.mHasLocals)
|
|
|
|
|
mData.setLocals (state.mLocals, mClass->getScript (ptr));
|
|
|
|
|
{
|
|
|
|
|
std::string scriptId = mClass->getScript (ptr);
|
|
|
|
|
|
|
|
|
|
mData.setLocals (*MWBase::Environment::get().getWorld()->getStore().
|
|
|
|
|
get<ESM::Script>().search (scriptId));
|
|
|
|
|
mData.getLocals().read (state.mLocals, scriptId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mClass->readAdditionalState (ptr, state);
|
|
|
|
|
}
|
|
|
|
|