mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-30 06:43:45 +01:00
Fix punch sound being lost im limbo
parent
40783d2ca6
commit
1bbb606e63
@ -1897,21 +1897,11 @@ end
|
|||||||
-- only play hit sound and show blood effects if damage is 1 or over
|
-- only play hit sound and show blood effects if damage is 1 or over
|
||||||
if damage >= 1 then
|
if damage >= 1 then
|
||||||
|
|
||||||
-- weapon sounds
|
-- TODO (maybe): Support for custom weapon sounds
|
||||||
if weapon:get_definition().sounds ~= nil then
|
minetest.sound_play("default_punch", {
|
||||||
|
object = hitter,
|
||||||
local s = random(0, #weapon:get_definition().sounds)
|
max_hear_distance = 5
|
||||||
|
})
|
||||||
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
|
|
||||||
|
|
||||||
-- blood_particles
|
-- blood_particles
|
||||||
if self.blood_amount > 0
|
if self.blood_amount > 0
|
||||||
|
Loading…
Reference in New Issue
Block a user