Use ephemeral sounds
This commit is contained in:
parent
b2c75acd68
commit
c5e4ec5e27
61 changed files with 123 additions and 122 deletions
|
@ -182,14 +182,14 @@ local snowball_on_step = function(self, dtime)
|
|||
-- Destroy when hitting a solid node
|
||||
if self._lastpos.x~=nil then
|
||||
if (def and def.walkable) or not def then
|
||||
minetest.sound_play("mcl_throwing_snowball_impact_hard", { pos = self.object:get_pos(), max_hear_distance=16, gain=0.7 })
|
||||
minetest.sound_play("mcl_throwing_snowball_impact_hard", { pos = self.object:get_pos(), max_hear_distance=16, gain=0.7 }, true)
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if check_object_hit(self, pos, {snowball_vulnerable = 3}) then
|
||||
minetest.sound_play("mcl_throwing_snowball_impact_soft", { pos = self.object:get_pos(), max_hear_distance=16, gain=0.7 })
|
||||
minetest.sound_play("mcl_throwing_snowball_impact_soft", { pos = self.object:get_pos(), max_hear_distance=16, gain=0.7 }, true)
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -243,7 +243,7 @@ local egg_on_step = function(self, dtime)
|
|||
end
|
||||
end
|
||||
end
|
||||
minetest.sound_play("mcl_throwing_egg_impact", { pos = self.object:get_pos(), max_hear_distance=10, gain=0.5 })
|
||||
minetest.sound_play("mcl_throwing_egg_impact", { pos = self.object:get_pos(), max_hear_distance=10, gain=0.5 }, true)
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
|
@ -251,7 +251,7 @@ local egg_on_step = function(self, dtime)
|
|||
|
||||
-- Destroy when hitting a mob or player (no chick spawning)
|
||||
if check_object_hit(self, pos) then
|
||||
minetest.sound_play("mcl_throwing_egg_impact", { pos = self.object:get_pos(), max_hear_distance=10, gain=0.5 })
|
||||
minetest.sound_play("mcl_throwing_egg_impact", { pos = self.object:get_pos(), max_hear_distance=10, gain=0.5 }, true)
|
||||
return
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue