reset if disabled rather than just bailing

This commit is contained in:
Lilian Jónsdóttir 2021-08-09 09:52:11 -07:00
parent c0240b4462
commit 59143cd6d0

View file

@ -34,9 +34,6 @@ end
-- Event functions -- Event functions
local function sinkInWater(e) local function sinkInWater(e)
-- don't even calculate anything if disabled
if not config.enabled then return end
-- shortcut refs -- shortcut refs
local mobile = e.mobile local mobile = e.mobile
local ref = e.reference local ref = e.reference
@ -75,8 +72,8 @@ local function sinkInWater(e)
ref.id, downPull, encumbrance.current, encumbrance.base, encumbrance.normalized) ref.id, downPull, encumbrance.current, encumbrance.base, encumbrance.normalized)
end end
-- reset if levitating -- reset if levitating or mod disabled
if mobile.levitate > 0 then downPull = 0 end if mobile.levitate > 0 or not config.enabled then downPull = 0 end
-- only if mostly underwater to stop pseudo-waterwalking when jumping into water -- only if mostly underwater to stop pseudo-waterwalking when jumping into water
if headHeight <= waterLevel then if headHeight <= waterLevel then