mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-11-13 05:50:17 +01:00
forgot def.loudness check
This commit is contained in:
parent
e4a5ead82c
commit
219db764bf
4
api.lua
4
api.lua
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user