mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
correct elseif statement
This commit is contained in:
parent
31f57a51e0
commit
623f60ab79
1 changed files with 3 additions and 3 deletions
|
@ -457,7 +457,7 @@ function mcl_potions.healing_func(player, hp)
|
||||||
|
|
||||||
if obj and obj._cmi_is_mob then
|
if obj and obj._cmi_is_mob then
|
||||||
obj.health = math.max(obj.health + hp, obj.hp_max)
|
obj.health = math.max(obj.health + hp, obj.hp_max)
|
||||||
elseif player:is_player()
|
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
|
else
|
||||||
return
|
return
|
||||||
|
@ -467,10 +467,10 @@ function mcl_potions.healing_func(player, hp)
|
||||||
|
|
||||||
if obj and obj._cmi_is_mob then
|
if obj and obj._cmi_is_mob then
|
||||||
obj.health = obj.health + hp
|
obj.health = obj.health + hp
|
||||||
elseif player:is_player()
|
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
|
else
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue