From bd98529945a7f68fd014c1f2552bd77e2fe28923 Mon Sep 17 00:00:00 2001 From: epCode Date: Wed, 3 Feb 2021 16:29:33 -0800 Subject: [PATCH] Fix sneak/R.click bugs --- mods/PLAYER/mcl_playerplus/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index d3729e75..f7228368 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -26,14 +26,14 @@ minetest.register_globalstep(function(dtime) -- controls head bone pitch = degrees(player:get_look_vertical()) * -1 - - if controls.LMB or controls.RMB then + + if controls.LMB or then player:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(pitch,0,0)) else player:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(0,0,0)) end - - if controls.sneak then + + if controls.sneak player:get_attach() == nil then player:set_bone_position("Head", vector.new(0,6.3,0), vector.new(pitch+36,0,0)) if player:get_properties().collisionbox ~= {-0.35,0,-0.35,0.35,1.40,0.35} then player:set_properties({collisionbox = {-0.35,0,-0.35,0.35,1.35,0.35}, eye_height = 1.35})