From c390aee586257ca3aec1e646ec7653a64dc2ba9e Mon Sep 17 00:00:00 2001 From: Heroman Date: Wed, 31 Aug 2022 17:07:07 +1000 Subject: [PATCH] Makes ignore_walls ignore only walls and not other things --- code/game/sound.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/game/sound.dm b/code/game/sound.dm index 4fef9f41ed..0833824224 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -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