blockgame/mods/bg_player/step_height.lua

10 lines
284 B
Lua
Raw Normal View History

local utils = load_file("util_misc")
blockgame.register_globalstep(function(delta_time)
2023-10-13 06:30:16 +00:00
for _, player in pairs(minetest.get_connected_players()) do
utils.handle_player(player, function (_, data)
data.properties.stepheight = data.control.sneak and 0.01 or 1.05
end)
2023-10-13 06:30:16 +00:00
end
end)