1
0
Fork 0
This commit is contained in:
Lizzy Fleckenstein 2021-02-22 10:41:44 +01:00
parent 512765a37d
commit 152d49ef20
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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