Fix exhauston for attacking and taking dmg

This commit is contained in:
Wuzzy 2019-02-28 16:43:52 +01:00
parent 6497916ade
commit 7851cee45e
9 changed files with 18 additions and 19 deletions

View file

@ -1,5 +1,4 @@
local dmes = minetest.get_modpath("mcl_death_messages") ~= nil
local hung = minetest.get_modpath("mcl_hunger") ~= nil
local get_falling_depth = function(self)
if not self._startpos then
@ -56,9 +55,6 @@ local deal_falling_damage = function(self, dtime)
if dmes then
mcl_death_messages.player_damage(v, string.format(msg, v:get_player_name()))
end
if hung then
mcl_hunger.exhaust(v:get_player_name(), mcl_hunger.EXHAUST_DAMAGE)
end
end
v:set_hp(hp)
end