1
0
Fork 0

Sneaking reduces player height (y2) by 0.5 and the block above the player is logged when sneaking

This commit is contained in:
argo 2023-09-02 16:29:43 +02:00
parent b0208e622b
commit 3988887e92
1 changed files with 5 additions and 1 deletions

View File

@ -163,7 +163,7 @@ local player_props_riding = {
nametag_color = { r = 225, b = 225, a = 225, g = 225 }
}
local player_props_sneaking = {
collisionbox = { -0.312, 0, -0.312, 0.312, 1.8, 0.312 },
collisionbox = { -0.312, 0, -0.312, 0.312, 1.3, 0.312 },
eye_height = 1.35,
nametag_color = { r = 225, b = 225, a = 0, g = 225 }
}
@ -385,6 +385,10 @@ minetest.register_globalstep(function(dtime)
-- sneaking body conrols
set_bone_pos(player, "Body_Control", nil, vector.new(0, -player_vel_yaw + yaw, 0))
-- log block above head for sneaking height tests
print(mcl_playerinfo[name].node_head)
elseif get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 and is_sprinting(name) == true then
-- set head pitch and yaw when swimming
is_swimming = true