1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2024-11-14 06:20:18 +01:00

forgot def.loudness check

This commit is contained in:
tenplus1 2024-10-02 15:51:05 +01:00
parent e4a5ead82c
commit 219db764bf

View File

@ -4812,7 +4812,9 @@ if settings:get_bool("mobs_can_hear") ~= false then
def.distance = get_distance(def.pos, ps[n])
def.loudness = def.gain - (bit * def.distance)
if ndef and ndef.on_sound then ndef.on_sound(ps[n], def) end
if def.loudness > 0 and ndef and ndef.on_sound then
ndef.on_sound(ps[n], def)
end
end
end