blockgame/mods/bg_player/step_height.lua
trans_soup 568e8059f9 refactor: more wrappers
create more wrappers for built-in functions and use them instead.
2023-10-13 09:31:55 +02:00

9 lines
284 B
Lua

local utils = load_file("util_misc")
blockgame.register_globalstep(function(delta_time)
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)
end
end)