From de0a78012de18968db9e2d0ea849c73bf1d143b5 Mon Sep 17 00:00:00 2001 From: SumianVoice Date: Mon, 18 Jul 2022 10:09:04 +1000 Subject: [PATCH] fix getting stuck under non-opaque blocks --- mods/PLAYER/mcl_playerplus/init.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index cdee0b798..c3876269c 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -377,10 +377,8 @@ minetest.register_globalstep(function(dtime) set_properties_conditional(player,{collisionbox = {-0.312,0,-0.312,0.312,0.8,0.312}, eye_height = 0.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }}) -- control body bone when swimming set_bone_position_conditional(player,"Body_Control", vector.new(0,6.3,0), vector.new(degrees(dir_to_pitch(player_velocity)) - 90,-player_vel_yaw + yaw + 180,0)) - elseif (mcl_playerinfo[name].node_head_top == "air" -- make sure the collision box is not going to clip through the ceiling - or get_item_group(mcl_playerinfo[name].node_head_top, "water") ~= 0) - and (mcl_playerinfo[name].node_head == "air" - or get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0) then + elseif get_item_group(mcl_playerinfo[name].node_head, "opaque") == 0 + and get_item_group(mcl_playerinfo[name].node_head_top, "opaque") == 0 then -- sets eye height, and nametag color accordingly is_swimming = false set_properties_conditional(player,{collisionbox = {-0.312,0,-0.312,0.312,1.8,0.312}, eye_height = 1.5, nametag_color = { r = 225, b = 225, a = 225, g = 225 }})