summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/vm/runner.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/script/vm/runner.lua b/script/vm/runner.lua
index 4a26947a..97f362f3 100644
--- a/script/vm/runner.lua
+++ b/script/vm/runner.lua
@@ -270,9 +270,11 @@ function mt:_lookIntoAction(action, topNode)
self:_lookIntoExp(value, topNode:copy())
end
if action.type == 'setlocal' then
- local newTopNode = self._callback(action, topNode)
- if newTopNode then
- topNode = newTopNode
+ if action.node == self._loc then
+ local newTopNode = self._callback(action, topNode)
+ if newTopNode then
+ topNode = newTopNode
+ end
end
elseif action.type == 'function' then
self:_launchBlock(action, topNode:copy())