mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
run targeted scripts with an implicit reference based on the ID given
This commit is contained in:
parent
e8322da663
commit
dba6a9ebff
@ -75,8 +75,15 @@ namespace MWScript
|
||||
{
|
||||
if (iter->second.mRunning)
|
||||
{
|
||||
MWWorld::Ptr ptr;
|
||||
|
||||
if (!iter->second.mId.empty())
|
||||
ptr = MWBase::Environment::get().getWorld()->getPtr (
|
||||
iter->second.mId, false);
|
||||
|
||||
MWScript::InterpreterContext interpreterContext (
|
||||
&iter->second.mLocals, MWWorld::Ptr());
|
||||
&iter->second.mLocals, ptr);
|
||||
|
||||
MWBase::Environment::get().getScriptManager()->run (iter->first, interpreterContext);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user