mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 05:51:56 +01:00
Makes sounds with a low enough volume only audible within line of sight (#6515)
It has been posited that it doesn't make sense to hear certain sounds through walls. So, I proceeded to go and change that. All sounds with a volume of 50 or less will now be played only to the "hearers" list. This is basically people within line of sight. I also rewrote the lower levels of the sound API with this. The code is now more modular, while retaining the same main API entry point playsound. This needs a test merge to see how badly I broke shit.
This commit is contained in:
@@ -209,8 +209,7 @@
|
||||
//hearers(15, src) << sound(soundfile)
|
||||
var/turf/source = get_turf(src)
|
||||
for(var/mob/M in hearers(15, source))
|
||||
M.playsound_local(source, file(soundfile), 100, falloff = 5)
|
||||
|
||||
M.playsound_simple(source, file(soundfile), 100, falloff = 5)
|
||||
|
||||
/obj/structure/device/piano/proc/playsong()
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user