Use sounds mod for explosion

This commit is contained in:
Jordan Irwin 2021-08-06 14:59:30 -07:00
parent 5f9e529caf
commit 4143bc9543
3 changed files with 3 additions and 2 deletions

@ -216,7 +216,6 @@ end
local function explode(self, pos) local function explode(self, pos)
self.object:remove() self.object:remove()
sneeker.boom(pos, self.powered) sneeker.boom(pos, self.powered)
core.sound_play("sneeker_explode", {object=self.object, gain=sneeker.boom_gain, max_hear_distance=2*64})
end end
--[[ --[[

Binary file not shown.

@ -307,7 +307,9 @@ function sneeker.boom(pos, large)
if large then if large then
radius = large_radius radius = large_radius
end end
core.sound_play("sneeker_explode", {pos=pos, gain=1.5, max_hear_distance=2*64}) if sounds then
sounds.explosion:play(1, {pos=pos, gain=sneeker.boom_gain, max_hear_distance=2*64})
end
core.set_node(pos, {name="tnt:boom"}) core.set_node(pos, {name="tnt:boom"})
core.get_node_timer(pos):start(0.5) core.get_node_timer(pos):start(0.5)
local drops = explode(pos, radius) local drops = explode(pos, radius)