increase player step height.
This commit is contained in:
parent
48a51a77ce
commit
3c25192944
2 changed files with 9 additions and 0 deletions
|
@ -1,2 +1,3 @@
|
||||||
load_file("hand")
|
load_file("hand")
|
||||||
load_file("run")
|
load_file("run")
|
||||||
|
load_file("step_height")
|
||||||
|
|
8
mods/bg_player/step_height.lua
Normal file
8
mods/bg_player/step_height.lua
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
minetest.register_globalstep(function(delta_time)
|
||||||
|
for _, player in pairs(minetest.get_connected_players()) do
|
||||||
|
local control = player:get_player_control()
|
||||||
|
local properties = player:get_properties()
|
||||||
|
properties.stepheight = control.sneak and 0.01 or 1.05
|
||||||
|
player:set_properties(properties)
|
||||||
|
end
|
||||||
|
end)
|
Loading…
Reference in a new issue