summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-07-14 10:29:59 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-07-14 10:29:59 +0100
commitff13cd4e6f4f6b4c634ae3798e108e442b65040c (patch)
treeeb97f7b028fb54c50745812a9b0329f63e1bab8d
parentc6cdb745770c05df8692c990de0bcb17596b9dec (diff)
fixed mobs:boom sounds
-rw-r--r--api.lua19
1 files changed, 15 insertions, 4 deletions
diff --git a/api.lua b/api.lua
index a8bf523..e87fcd9 100644
--- a/api.lua
+++ b/api.lua
@@ -1,9 +1,9 @@
--- Mobs Api (13th July 2017)
+-- Mobs Api (14th July 2017)
mobs = {}
mobs.mod = "redo"
-mobs.version = "20170713"
+mobs.version = "20170714"
-- Intllib
@@ -1703,7 +1703,13 @@ local do_states = function(self, dtime)
sound = self.sounds.explode,
})
else
- mob_sound(self, self.sounds.explode)
+
+ minetest.sound_play(self.sounds.explode, {
+ pos = pos,
+ gain = 1.0,
+ max_hear_distance = self.sounds.distance or 32
+ })
+
entity_physics(pos, damage_radius)
effect(pos, 32, "tnt_smoke.png", radius * 3, radius * 5, radius, 1, 0)
end
@@ -2994,7 +3000,12 @@ function mobs:boom(self, pos, radius)
sound = self.sounds.explode,
})
else
- mob_sound(self, self.sounds.explode)
+ minetest.sound_play(self.sounds.explode, {
+ pos = pos,
+ gain = 1.0,
+ max_hear_distance = self.sounds.distance or 32
+ })
+
entity_physics(pos, radius)
effect(pos, 32, "tnt_smoke.png", radius * 3, radius * 5, radius, 1, 0)
end