mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
Exhaust for falling anvil damage
This commit is contained in:
parent
3c72330880
commit
59930fd13c
2 changed files with 4 additions and 0 deletions
|
@ -1,2 +1,3 @@
|
||||||
mcl_sounds
|
mcl_sounds
|
||||||
mcl_core
|
mcl_core
|
||||||
|
mcl_hunger
|
||||||
|
|
|
@ -36,6 +36,9 @@ local on_step_add = function(self, dtime)
|
||||||
hp = 0
|
hp = 0
|
||||||
end
|
end
|
||||||
v:set_hp(hp)
|
v:set_hp(hp)
|
||||||
|
if v:is_player() then
|
||||||
|
mcl_hunger.exhaust(v:get_player_name(), mcl_hunger.EXHAUST_DAMAGE)
|
||||||
|
end
|
||||||
if hp == 0 then
|
if hp == 0 then
|
||||||
kill = true
|
kill = true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue