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:
parent
a3c4000198
commit
1ca0cc4988
1 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue