mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-06-28 06:30:18 +02:00
tweak loudness calculation for mod hearing
This commit is contained in:
8
api.txt
8
api.txt
@ -348,12 +348,14 @@ enhance mob functionality and have them do many interesting things:
|
||||
'on_sound' (self, def) called when mob is inside the hearing distance of
|
||||
a sound, passes a def table containing:
|
||||
'sound' the sound being played,
|
||||
'pos' position sound originated,
|
||||
'pos' position the sound originated,
|
||||
'gain' original gain of sound,
|
||||
'distance' distance of mob from sound source,
|
||||
'loudness' how loud sound is to mob when calculating gain / distance,
|
||||
'loudness' how loud sound is to mob (0 = cant hear, 1.0 = near sound), this
|
||||
would be used as the main value inside on_sound function,
|
||||
'player' player name sound originated,
|
||||
'object' object reference sound originated
|
||||
'object' object reference sound originated,
|
||||
'max_hear_distance' max distance sound can be heard from source.
|
||||
|
||||
|
||||
Internal Variables
|
||||
|
Reference in New Issue
Block a user