From a2f112240598b2bf7c6f5d9c30f1031be329ef81 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 10 Jan 2018 21:39:22 +0100 Subject: [PATCH] Remove get_look_pitch in mesecons_pistons --- mods/ITEMS/REDSTONE/mesecons_pistons/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua b/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua index 4868a5fe1..7ca1cea5a 100644 --- a/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_pistons/init.lua @@ -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