mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 20:49:56 +00:00
Fix InterpreterContext::updatePtr updating mLocals to the implicit ref's locals when interpreting a targeted global script (Fixes #3738)
The interpreter context of a targeted global script would point to the target's locals instead of the global script instance's locals when the target changed cell during script execution. Credit to scrawl for the solution.
This commit is contained in:
parent
4c4ec6b108
commit
d97e9cfe7e
1 changed files with 2 additions and 1 deletions
|
@ -582,6 +582,7 @@ namespace MWScript
|
|||
if (!mReference.isEmpty() && base == mReference)
|
||||
{
|
||||
mReference = updated;
|
||||
if (mLocals == &base.getRefData().getLocals())
|
||||
mLocals = &mReference.getRefData().getLocals();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue