forked from Mineclonia/Mineclonia
Add flop sound when mob flops on ground
This commit is contained in:
parent
c7084cb79a
commit
22a0b107ba
|
@ -2160,7 +2160,9 @@ local follow_flop = function(self)
|
||||||
self.object:set_acceleration({x = 0, y = DEFAULT_FALL_SPEED, z = 0})
|
self.object:set_acceleration({x = 0, y = DEFAULT_FALL_SPEED, z = 0})
|
||||||
|
|
||||||
local sdef = minetest.registered_nodes[self.standing_on]
|
local sdef = minetest.registered_nodes[self.standing_on]
|
||||||
|
-- Flop on ground
|
||||||
if sdef and sdef.walkable then
|
if sdef and sdef.walkable then
|
||||||
|
mob_sound(self, "flop")
|
||||||
self.object:set_velocity({
|
self.object:set_velocity({
|
||||||
x = math.random(-FLOP_HOR_SPEED, FLOP_HOR_SPEED),
|
x = math.random(-FLOP_HOR_SPEED, FLOP_HOR_SPEED),
|
||||||
y = FLOP_HEIGHT,
|
y = FLOP_HEIGHT,
|
||||||
|
|
|
@ -151,6 +151,7 @@ functions needed for the mob to work properly which contains the following:
|
||||||
'damage' sound heard when mob is hurt.
|
'damage' sound heard when mob is hurt.
|
||||||
'death' played when mob is killed.
|
'death' played when mob is killed.
|
||||||
'jump' played when mob jumps. There's a built-in cooloff timer to avoid sound spam
|
'jump' played when mob jumps. There's a built-in cooloff timer to avoid sound spam
|
||||||
|
'flop' played when mob flops (like a stranded fish)
|
||||||
'fuse' sound played when mob explode timer starts.
|
'fuse' sound played when mob explode timer starts.
|
||||||
'explode' sound played when mob explodes.
|
'explode' sound played when mob explodes.
|
||||||
|
|
||||||
|
|
|
@ -136,6 +136,10 @@ Origin of those models:
|
||||||
* `mobs_mc_blaze_breath.ogg`
|
* `mobs_mc_blaze_breath.ogg`
|
||||||
* `mobs_mc_blaze_died.ogg`
|
* `mobs_mc_blaze_died.ogg`
|
||||||
* `mobs_mc_squid_hurt.ogg`
|
* `mobs_mc_squid_hurt.ogg`
|
||||||
|
* [kyles](https://freesound.org/people/kyles/)
|
||||||
|
* `mobs_mc_squid_flop.*.ogg` (CC0)
|
||||||
|
* Source: <https://freesound.org/people/kyles/sounds/450830/>
|
||||||
|
* `mobs_mc_squid_flop.*.ogg` (CC0)
|
||||||
* [thefilmbakery](https://freesound.org/people/thefilmbakery/) (CC0)
|
* [thefilmbakery](https://freesound.org/people/thefilmbakery/) (CC0)
|
||||||
* `mobs_mc_blaze_hurt.ogg`
|
* `mobs_mc_blaze_hurt.ogg`
|
||||||
* Source: <https://freesound.org/people/thefilmbakery/sounds/137836/>
|
* Source: <https://freesound.org/people/thefilmbakery/sounds/137836/>
|
||||||
|
|
|
@ -30,6 +30,7 @@ mobs:register_mob("mobs_mc:guardian", {
|
||||||
war_cry = "mobs_mc_guardian_random",
|
war_cry = "mobs_mc_guardian_random",
|
||||||
damage = {name="mobs_mc_guardian_hurt", gain=0.3},
|
damage = {name="mobs_mc_guardian_hurt", gain=0.3},
|
||||||
death = "mobs_mc_guardian_death",
|
death = "mobs_mc_guardian_death",
|
||||||
|
flop = "mobs_mc_squid_flop",
|
||||||
distance = 16,
|
distance = 16,
|
||||||
},
|
},
|
||||||
animation = {
|
animation = {
|
||||||
|
|
|
@ -32,6 +32,7 @@ mobs:register_mob("mobs_mc:guardian_elder", {
|
||||||
war_cry = "mobs_mc_guardian_random",
|
war_cry = "mobs_mc_guardian_random",
|
||||||
damage = {name="mobs_mc_guardian_hurt", gain=0.3},
|
damage = {name="mobs_mc_guardian_hurt", gain=0.3},
|
||||||
death = "mobs_mc_guardian_death",
|
death = "mobs_mc_guardian_death",
|
||||||
|
flop = "mobs_mc_squid_flop",
|
||||||
base_pitch = 0.6,
|
base_pitch = 0.6,
|
||||||
distance = 16,
|
distance = 16,
|
||||||
},
|
},
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -24,6 +24,7 @@ mobs:register_mob("mobs_mc:squid", {
|
||||||
sounds = {
|
sounds = {
|
||||||
damage = "mobs_mc_squid_hurt",
|
damage = "mobs_mc_squid_hurt",
|
||||||
death = "mobs_mc_squid_hurt",
|
death = "mobs_mc_squid_hurt",
|
||||||
|
flop = "mobs_mc_squid_flop",
|
||||||
-- TODO: sounds: random, damage, death
|
-- TODO: sounds: random, damage, death
|
||||||
distance = 16,
|
distance = 16,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue