move hudbar stuff outside initial statement.

This commit is contained in:
Brandon 2020-08-02 20:50:29 -04:00
parent af1ab424fc
commit 67e4e814f4

View File

@ -638,10 +638,6 @@ function mcl_potions.poison_func(player, factor, duration)
is_poisoned[player] = {step = factor, dur = duration, timer = 0}
if player:is_player() then
potions_set_hudbar(player)
end
else
local victim = is_poisoned[player]
@ -651,6 +647,11 @@ function mcl_potions.poison_func(player, factor, duration)
victim.timer = 0
end
if player:is_player() then
potions_set_hudbar(player)
end
end
@ -660,10 +661,6 @@ function mcl_potions.regeneration_func(player, factor, duration)
is_regenerating[player] = {step = factor, dur = duration, timer = 0}
if player:is_player() then
potions_set_hudbar(player)
end
else
local victim = is_regenerating[player]
@ -673,6 +670,11 @@ function mcl_potions.regeneration_func(player, factor, duration)
victim.timer = 0
end
if player:is_player() then
potions_set_hudbar(player)
end
end