From 152d49ef20952004bd96e8ad7f8d6e604e4aafc2 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Mon, 22 Feb 2021 10:41:44 +0100 Subject: [PATCH] Fix #1167 --- mods/PLAYER/mcl_playerplus/init.lua | 4 ++-- mods/PLAYER/mcl_sprint/init.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index a5e71a61..c3074a9d 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -204,8 +204,8 @@ minetest.register_globalstep(function(dtime) --[[ Swimming: Cause exhaustion. NOTE: As of 0.4.15, it only counts as swimming when you are with the feet inside the liquid! Head alone does not count. We respect that for now. ]] - if minetest.get_item_group(node_feet, "liquid") ~= 0 or - minetest.get_item_group(node_stand, "liquid") ~= 0 then + if not player:get_attach() and (minetest.get_item_group(node_feet, "liquid") ~= 0 or + minetest.get_item_group(node_stand, "liquid") ~= 0) then local lastPos = mcl_playerplus_internal[name].lastPos if lastPos then local dist = vector.distance(lastPos, pos) diff --git a/mods/PLAYER/mcl_sprint/init.lua b/mods/PLAYER/mcl_sprint/init.lua index 9e7690f4..2ef5be68 100644 --- a/mods/PLAYER/mcl_sprint/init.lua +++ b/mods/PLAYER/mcl_sprint/init.lua @@ -115,7 +115,7 @@ minetest.register_globalstep(function(dtime) local playerPos = player:get_pos() --If the player is sprinting, create particles behind and cause exhaustion - if playerInfo["sprinting"] == true and gameTime % 0.1 == 0 then + if playerInfo["sprinting"] == true and not player:get_attach() and gameTime % 0.1 == 0 then -- Exhaust player for sprinting local lastPos = players[playerName].lastPos @@ -158,7 +158,7 @@ minetest.register_globalstep(function(dtime) if players[playerName]["shouldSprint"] == true then --Stopped local sprinting -- Prevent sprinting if hungry or sleeping - if (mcl_hunger.active and mcl_hunger.get_hunger(player) <= 6) or (player:get_meta():get_string("mcl_beds:sleeping") == "true")then + if (mcl_hunger.active and mcl_hunger.get_hunger(player) <= 6) or (player:get_meta():get_string("mcl_beds:sleeping") == "true") then sprinting = false else sprinting = true