From f71cff04686f431352aac64e4377f3c4ce88fc61 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 8 Jan 2018 04:03:28 +0100 Subject: [PATCH] Can't sprint and sneak at the same time --- 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 7f1559eb1d..8208e230ce 100644 --- a/mods/PLAYER/mcl_sprint/init.lua +++ b/mods/PLAYER/mcl_sprint/init.lua @@ -47,8 +47,9 @@ minetest.register_globalstep(function(dtime) for playerName,playerInfo in pairs(players) do local player = minetest.get_player_by_name(playerName) if player ~= nil then + local ctrl = player:get_player_control() --Check if the player should be sprinting - if player:get_player_control()["aux1"] and player:get_player_control()["up"] then + if ctrl.aux1 and ctrl.up and not ctrl.sneak then players[playerName]["shouldSprint"] = true else players[playerName]["shouldSprint"] = false