From 1bbb606e63e72d57a606f0c83dc98887f7d0bbd8 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 20 Feb 2017 16:37:18 +0100 Subject: [PATCH] Fix punch sound being lost im limbo --- mods/ENTITIES/mobs/api.lua | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/mods/ENTITIES/mobs/api.lua b/mods/ENTITIES/mobs/api.lua index 998ca65a..f5abb73d 100644 --- a/mods/ENTITIES/mobs/api.lua +++ b/mods/ENTITIES/mobs/api.lua @@ -1897,21 +1897,11 @@ end -- only play hit sound and show blood effects if damage is 1 or over if damage >= 1 then - -- weapon sounds - if weapon:get_definition().sounds ~= nil then - - local s = random(0, #weapon:get_definition().sounds) - - minetest.sound_play(weapon:get_definition().sounds[s], { - object = hitter, - max_hear_distance = 8 - }) - else - minetest.sound_play("default_punch", { - object = hitter, - max_hear_distance = 5 - }) - end + -- TODO (maybe): Support for custom weapon sounds + minetest.sound_play("default_punch", { + object = hitter, + max_hear_distance = 5 + }) -- blood_particles if self.blood_amount > 0