From 357e62b68d67c4218d95f6bee937e6d5e206d752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 18 Mar 2019 16:23:16 +0800 Subject: =?UTF-8?q?=E9=87=8D=E6=9E=84=E6=96=87=E4=BB=B6=E7=AC=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/vm/vm.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'server/src/vm/vm.lua') diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua index 093122e4..9fcd57ae 100644 --- a/server/src/vm/vm.lua +++ b/server/src/vm/vm.lua @@ -40,6 +40,7 @@ function mt:buildTable(source) if obj.type == 'pair' then local value = self:getFirstInMulti(self:getExp(obj[2])) local key = obj[1] + self:instantSource(obj) self:instantSource(key) key:bindValue(value, 'set') if key.index then @@ -794,6 +795,7 @@ function mt:doSet(action) if not action[2] then return end + self:instantSource(action) -- 要先计算值 local vars = action[1] local exps = action[2] @@ -814,6 +816,7 @@ function mt:doSet(action) end function mt:doLocal(action) + self:instantSource(action) local vars = action[1] local exps = action[2] local values @@ -966,7 +969,6 @@ function mt:doLocalFunction(action) local func = self:buildFunction(action) func:addInfo('local', name) loc:setValue(func) - loc:setInitValue(func) end end end -- cgit v1.2.3