forked from nalc/homedecor_modpack
Fix use of deprecated get_look_yaw() (#62)
This commit is contained in:
parent
46c71131c5
commit
951f77491c
|
@ -72,8 +72,8 @@ end
|
||||||
function lrfurn.fix_sofa_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
function lrfurn.fix_sofa_rotation_nsew(pos, placer, itemstack, pointed_thing)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local colorbits = node.param2 - (node.param2 % 8)
|
local colorbits = node.param2 - (node.param2 % 8)
|
||||||
local yaw = placer:get_look_yaw()
|
local yaw = placer:get_look_horizontal()
|
||||||
local dir = minetest.yaw_to_dir(yaw-1.5)
|
local dir = minetest.yaw_to_dir(yaw)
|
||||||
local fdir = minetest.dir_to_wallmounted(dir)
|
local fdir = minetest.dir_to_wallmounted(dir)
|
||||||
minetest.swap_node(pos, { name = node.name, param2 = fdir+colorbits })
|
minetest.swap_node(pos, { name = node.name, param2 = fdir+colorbits })
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user