From 60bf1393ff70e449081dc23137e28e0f347ecc29 Mon Sep 17 00:00:00 2001 From: Dieter44 <55900078+Dieter44@users.noreply.github.com> Date: Wed, 24 Nov 2021 16:48:12 +0100 Subject: [PATCH] disable sprinting when player sneaks --- mods/PLAYER/mcl_sprint/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/PLAYER/mcl_sprint/init.lua b/mods/PLAYER/mcl_sprint/init.lua index aee7981588..f21c8c3561 100644 --- a/mods/PLAYER/mcl_sprint/init.lua +++ b/mods/PLAYER/mcl_sprint/init.lua @@ -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