forked from mtcontrib/unifieddyes
"widen" the range for floor/ceiling placement checking
in fix_rotation function
This commit is contained in:
parent
80e5429bf3
commit
aacb377f8c
4
init.lua
4
init.lua
@ -103,9 +103,9 @@ function unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
|||||||
|
|
||||||
local fdir = minetest.dir_to_wallmounted(dir)
|
local fdir = minetest.dir_to_wallmounted(dir)
|
||||||
|
|
||||||
if pitch < -(math.pi/4) then
|
if pitch < -(math.pi/8) then
|
||||||
fdir = 0
|
fdir = 0
|
||||||
elseif pitch > math.pi/4 then
|
elseif pitch > math.pi/8 then
|
||||||
fdir = 1
|
fdir = 1
|
||||||
end
|
end
|
||||||
minetest.swap_node(pos, { name = node.name, param2 = fdir })
|
minetest.swap_node(pos, { name = node.name, param2 = fdir })
|
||||||
|
Loading…
Reference in New Issue
Block a user