Disable slime splat noise
This commit is contained in:
parent
a5f470ad91
commit
367ab694a6
@ -97,6 +97,7 @@ mob_register.projectile_timer = 0
|
||||
mob_register.projectile_type = def.projectile_type
|
||||
|
||||
mob_register.takes_fall_damage = def.takes_fall_damage or true
|
||||
mob_register.make_jump_noise = def.make_jump_noise
|
||||
|
||||
mob_register.item_drop = def.item_drop
|
||||
mob_register.item_minimum = def.item_minimum or 1
|
||||
|
@ -126,7 +126,9 @@ mobs.create_movement_functions = function(def,mob_register)
|
||||
local vel = self.object:get_velocity()
|
||||
if self.jump_timer <= 0 then
|
||||
if vel.y == 0 and self.oldvely and self.oldvely <= 0 then --use <= on self.oldvely to make slime make landing sound
|
||||
minetest.sound_play("slime_splat", {object=self.object, gain = 1.0, max_hear_distance = 10,pitch = math.random(80,100)/100})
|
||||
if self.make_jump_noise then
|
||||
minetest.sound_play("slime_splat", {object=self.object, gain = 1.0, max_hear_distance = 10,pitch = math.random(80,100)/100})
|
||||
end
|
||||
local vel = self.object:get_velocity()
|
||||
self.jump_timer = 1+math.random()
|
||||
if self.hostile == true then
|
||||
|
@ -108,6 +108,7 @@ mobs.register_mob(
|
||||
automatic_face_movement_max_rotation_per_sec = 300,
|
||||
makes_footstep_sound = false,
|
||||
takes_fall_damage = false,
|
||||
make_jump_noise = false,
|
||||
hp = 10,
|
||||
gravity = {x = 0, y = -1, z = 0},
|
||||
movement_type = "jump",
|
||||
|
Loading…
x
Reference in New Issue
Block a user