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

@ -7,7 +7,6 @@ local GRAVITY = 9.81
local YAW_OFFSET = -math.pi/2
local mod_mcl_hunger = minetest.get_modpath("mcl_hunger")
local mod_awards = minetest.get_modpath("awards") and minetest.get_modpath("mcl_achievements")
local mod_button = minetest.get_modpath("mesecons_button")
@ -193,9 +192,6 @@ ARROW_ENTITY.on_step = function(self, dtime)
-- “Ding” sound for hitting another player
minetest.sound_play({name="mcl_bows_hit_player", gain=0.1}, {to_player=self._shooter})
end
if mod_mcl_hunger then
mcl_hunger.exhaust(obj:get_player_name(), mcl_hunger.EXHAUST_DAMAGE)
end
end
if lua then

View file

@ -1,7 +1,6 @@
controls
awards?
mcl_achievements?
mcl_hunger?
mcl_core?
mcl_mobitems?
playerphysics?

View file

@ -1,5 +1,4 @@
mcl_sounds?
mcl_mobitems?
mcl_hunger?
mcl_death_messages?
doc_identifier?

View file

@ -1,5 +1,4 @@
local mod_death_messages = minetest.get_modpath("mcl_death_messages")
local mod_hunger = minetest.get_modpath("mcl_hunger")
local function spawn_tnt(pos, entname)
minetest.sound_play("tnt_ignite", {pos = pos,gain = 1.0,max_hear_distance = 15,})
@ -33,9 +32,6 @@ local function do_tnt_physics(tnt_np,tntr)
if mod_death_messages then
mcl_death_messages.player_damage(obj, string.format("%s was caught in an explosion.", obj:get_player_name()))
end
if mod_hunger then
mcl_hunger.exhaust(obj:get_player_name(), mcl_hunger.EXHAUST_DAMAGE)
end
end
obj:set_hp(obj:get_hp() - damage)
end