From e59fd53ee9bc145d97182365242610d01c06a76b Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Fri, 11 Oct 2024 10:24:07 +0100 Subject: [PATCH] make sure def.gain has a value --- api.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api.lua b/api.lua index 96d2da7..ad9f468 100644 --- a/api.lua +++ b/api.lua @@ -18,7 +18,7 @@ end mobs = { mod = "redo", - version = "20241010", + version = "20241011", spawning_mobs = {}, translate = S, invis = minetest.global_exists("invisibility") and invisibility or {}, @@ -4774,6 +4774,7 @@ if settings:get_bool("mobs_can_hear") ~= false then --print("==", def.sound) + def.gain = def.gain or 1.0 def.max_hear_distance = param.max_hear_distance or 32 -- find mobs within sounds hearing range