1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-31 20:45:32 +00:00

rewrote MWScript::Locals::configure to be independent of precompiled script data

This commit is contained in:
Marc Zinnschlag 2014-07-25 09:37:21 +02:00
parent a3c4000198
commit 1ca0cc4988

View file

@ -14,12 +14,15 @@ namespace MWScript
{
void Locals::configure (const ESM::Script& script)
{
const Compiler::Locals& locals =
MWBase::Environment::get().getScriptManager()->getLocals (script.mId);
mShorts.clear();
mShorts.resize (script.mData.mNumShorts, 0);
mShorts.resize (locals.get ('s').size(), 0);
mLongs.clear();
mLongs.resize (script.mData.mNumLongs, 0);
mLongs.resize (locals.get ('l').size(), 0);
mFloats.clear();
mFloats.resize (script.mData.mNumFloats, 0);
mFloats.resize (locals.get ('f').size(), 0);
}
bool Locals::isEmpty() const