mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 13:53:45 +01:00
A little more code cleanup
This commit is contained in:
parent
9dce5581be
commit
9ef57692ba
@ -440,8 +440,6 @@ function mcl_potions.healing_func(player, hp)
|
|||||||
obj.health = math.max(obj.health + hp, obj.hp_max)
|
obj.health = math.max(obj.health + hp, obj.hp_max)
|
||||||
elseif player:is_player() then
|
elseif player:is_player() then
|
||||||
player:set_hp(math.min(player:get_hp() + hp, player:get_properties().hp_max), { type = "set_hp", other = "healing" })
|
player:set_hp(math.min(player:get_hp() + hp, player:get_properties().hp_max), { type = "set_hp", other = "healing" })
|
||||||
else
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -450,8 +448,6 @@ function mcl_potions.healing_func(player, hp)
|
|||||||
obj.health = obj.health + hp
|
obj.health = obj.health + hp
|
||||||
elseif player:is_player() then
|
elseif player:is_player() then
|
||||||
player:set_hp(player:get_hp() + hp, { type = "punch", other = "harming" })
|
player:set_hp(player:get_hp() + hp, { type = "punch", other = "harming" })
|
||||||
else
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user