Merge pull request #13616 from Heroman3003/soundchange

Makes ignore_walls ignore only walls and not other things
This commit is contained in:
Casey
2022-08-31 03:38:06 -04:00
committed by GitHub
+4 -2
View File
@@ -13,9 +13,11 @@
// Looping through the player list has the added bonus of working for mobs inside containers
var/sound/S = sound(get_sfx(soundin))
var/maxdistance = (world.view + extrarange) * 2 //VOREStation Edit - 3 to 2
var/list/listeners = player_list
var/list/listeners = player_list.Copy()
if(!ignore_walls) //these sounds don't carry through walls
listeners = listeners & hearers(maxdistance,turf_source)
for(var/mob/listen in listeners)
if(!(get_turf(listen) in hear(maxdistance,source)))
listeners -= listen
for(var/mob/M as anything in listeners)
if(!M || !M.client)
continue