forked from VoxeLibre/VoxeLibre
disable sprinting when player sneaks
This commit is contained in:
parent
b60c914dcd
commit
60bf1393ff
|
@ -180,8 +180,9 @@ minetest.register_globalstep(function(dtime)
|
|||
w_prev_pressed = false
|
||||
w_double_pressed = false
|
||||
end
|
||||
|
||||
--Check if the player should be sprinting
|
||||
if players[playerName]["clientSprint"] or ctrl.aux1 or w_double_pressed and ctrl.up and ctrl.sneak==false then
|
||||
if (players[playerName]["clientSprint"] or ctrl.aux1 or w_double_pressed) and ctrl.up and ctrl.sneak==false then
|
||||
players[playerName]["shouldSprint"] = true
|
||||
else
|
||||
players[playerName]["shouldSprint"] = false
|
||||
|
|
Loading…
Reference in New Issue