1
0
Fork 1
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:
MiroslavR 2017-01-29 13:29:53 +01:00
parent 4c4ec6b108
commit d97e9cfe7e

View file

@ -582,6 +582,7 @@ namespace MWScript
if (!mReference.isEmpty() && base == mReference)
{
mReference = updated;
if (mLocals == &base.getRefData().getLocals())
mLocals = &mReference.getRefData().getLocals();
}
}