mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-07 06:06:10 -04:00
Use minetest.swap_node instead of hacky_swap_node
This commit is contained in:
parent
ba4c80644e
commit
47a49eccf4
3 changed files with 8 additions and 21 deletions
|
@ -113,14 +113,10 @@ function doors:register_door(name, def)
|
|||
local p2 = minetest.get_node(pos).param2
|
||||
p2 = params[p2+1]
|
||||
|
||||
local meta = minetest.get_meta(pos):to_table()
|
||||
minetest.set_node(pos, {name=replace_dir, param2=p2})
|
||||
minetest.get_meta(pos):from_table(meta)
|
||||
minetest.swap_node(pos, {name=replace_dir, param2=p2})
|
||||
|
||||
pos.y = pos.y-dir
|
||||
meta = minetest.get_meta(pos):to_table()
|
||||
minetest.set_node(pos, {name=replace, param2=p2})
|
||||
minetest.get_meta(pos):from_table(meta)
|
||||
minetest.swap_node(pos, {name=replace, param2=p2})
|
||||
end
|
||||
|
||||
local function check_player_priv(pos, player)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue