forked from VoxeLibre/VoxeLibre
Sneaking reduces player height (y2) by 0.5 and the block above the player is logged when sneaking
This commit is contained in:
parent
b0208e622b
commit
3988887e92
|
@ -163,7 +163,7 @@ local player_props_riding = {
|
||||||
nametag_color = { r = 225, b = 225, a = 225, g = 225 }
|
nametag_color = { r = 225, b = 225, a = 225, g = 225 }
|
||||||
}
|
}
|
||||||
local player_props_sneaking = {
|
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,
|
eye_height = 1.35,
|
||||||
nametag_color = { r = 225, b = 225, a = 0, g = 225 }
|
nametag_color = { r = 225, b = 225, a = 0, g = 225 }
|
||||||
}
|
}
|
||||||
|
@ -385,6 +385,10 @@ minetest.register_globalstep(function(dtime)
|
||||||
|
|
||||||
-- sneaking body conrols
|
-- sneaking body conrols
|
||||||
set_bone_pos(player, "Body_Control", nil, vector.new(0, -player_vel_yaw + yaw, 0))
|
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
|
elseif get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 and is_sprinting(name) == true then
|
||||||
-- set head pitch and yaw when swimming
|
-- set head pitch and yaw when swimming
|
||||||
is_swimming = true
|
is_swimming = true
|
||||||
|
|
Loading…
Reference in New Issue