fix for previous commit

actorid
Marc Zinnschlag 11 years ago
parent 6bd3b3ee78
commit 87ae03b5d4

@ -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);
}

@ -152,12 +152,6 @@ namespace MWWorld
}
}
void RefData::setLocals (const ESM::Locals& locals, const std::string& scriptId)
{
mHasLocals = true;
mLocals.read (locals, scriptId);
}
void RefData::setCount (int count)
{
if(count == 0)

@ -83,8 +83,6 @@ namespace MWWorld
void setLocals (const ESM::Script& script);
void setLocals (const ESM::Locals& locals, const std::string& scriptId);
void setCount (int count);
/// Set object count (an object pile is a simple object with a count >1).
///

Loading…
Cancel
Save