0
0
Fork 0

Fix punch sound being lost im limbo

This commit is contained in:
Wuzzy 2017-02-20 16:37:18 +01:00
parent 40783d2ca6
commit 1bbb606e63
1 changed files with 5 additions and 15 deletions

View File

@ -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