mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-28 04:23:01 +00:00
Remove get_look_pitch in mesecons_pistons
This commit is contained in:
parent
a399bc4a80
commit
a2f1122405
1 changed files with 4 additions and 4 deletions
|
@ -128,14 +128,14 @@ local piston_orientate = function (pos, placer)
|
|||
if not placer then return end
|
||||
|
||||
-- placer pitch in degrees
|
||||
local pitch = placer:get_look_pitch() * (180 / math.pi)
|
||||
local pitch = placer:get_look_vertical() * (180 / math.pi)
|
||||
|
||||
local node = minetest.get_node(pos)
|
||||
local pistonspec = minetest.registered_nodes[node.name].mesecons_piston
|
||||
if pitch > 55 then --looking upwards
|
||||
minetest.add_node(pos, {name=pistonspec.piston_down})
|
||||
elseif pitch < -55 then --looking downwards
|
||||
if pitch > 55 then
|
||||
minetest.add_node(pos, {name=pistonspec.piston_up})
|
||||
elseif pitch < -55 then
|
||||
minetest.add_node(pos, {name=pistonspec.piston_down})
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue