mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-25 18:30:29 +01:00
Remove the original only after creating the copy so players don't fall
through moving frames
This commit is contained in:
parent
e2c66949d3
commit
08acacba06
@ -364,7 +364,6 @@ function move_nodes_vect(poslist,vect)
|
|||||||
local node=minetest.env:get_node(pos)
|
local node=minetest.env:get_node(pos)
|
||||||
local meta=minetest.env:get_meta(pos):to_table()
|
local meta=minetest.env:get_meta(pos):to_table()
|
||||||
nodelist[#(nodelist)+1]={pos=pos,node=node,meta=meta}
|
nodelist[#(nodelist)+1]={pos=pos,node=node,meta=meta}
|
||||||
minetest.env:remove_node(pos)
|
|
||||||
end
|
end
|
||||||
objects={}
|
objects={}
|
||||||
for _,pos in ipairs(poslist) do
|
for _,pos in ipairs(poslist) do
|
||||||
@ -384,6 +383,15 @@ function move_nodes_vect(poslist,vect)
|
|||||||
minetest.env:set_node(npos,n.node)
|
minetest.env:set_node(npos,n.node)
|
||||||
local meta=minetest.env:get_meta(npos)
|
local meta=minetest.env:get_meta(npos)
|
||||||
meta:from_table(n.meta)
|
meta:from_table(n.meta)
|
||||||
|
for __,pos in ipairs(poslist) do
|
||||||
|
if npos.x==pos.x and npos.y==pos.y and npos.z==pos.z then
|
||||||
|
table.remove(poslist, __)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for __,pos in ipairs(poslist) do
|
||||||
|
minetest.env:remove_node(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user