mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-02-13 11:22:26 +01:00
move hudbar stuff outside initial statement.
This commit is contained in:
@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user