mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-11-16 07:10:32 +01:00
Report oldstack correctly (before mutation)
This commit is contained in:
parent
6deefcb718
commit
03f4b2d799
|
@ -220,6 +220,8 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, all_pull_sti
|
|||
minetest.remove_node(n.pos)
|
||||
end
|
||||
|
||||
local oldstack = mesecon.tablecopy(nodes)
|
||||
|
||||
-- update mesecons for removed nodes ( has to be done after all nodes have been removed )
|
||||
for _, n in ipairs(nodes) do
|
||||
mesecon.on_dignode(n.pos, n.node)
|
||||
|
@ -243,7 +245,6 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, all_pull_sti
|
|||
end
|
||||
|
||||
local moved_nodes = {}
|
||||
local oldstack = mesecon.tablecopy(nodes)
|
||||
for i in ipairs(nodes) do
|
||||
moved_nodes[i] = {}
|
||||
moved_nodes[i].oldpos = nodes[i].pos
|
||||
|
|
Loading…
Reference in New Issue
Block a user