mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 17:52:36 +00:00
fixes ghost hearing (#14534)
This commit is contained in:
@@ -6,6 +6,7 @@ SUBSYSTEM_DEF(mobs)
|
||||
wait = 2 SECONDS
|
||||
|
||||
var/list/currentrun = list()
|
||||
///only contains living players for some reason
|
||||
var/static/list/clients_by_zlevel[][]
|
||||
var/static/list/dead_players_by_zlevel[][] = list(list()) // Needs to support zlevel 1 here, MaxZChanged only happens when z2 is created and new_players can login before that.
|
||||
var/static/list/cubemonkeys = list()
|
||||
|
||||
@@ -68,11 +68,6 @@
|
||||
if(below_turf && istransparentturf(turf_source))
|
||||
listeners += SSmobs.clients_by_zlevel[below_turf.z]
|
||||
|
||||
for(var/mob/listening_mob as anything in listeners)
|
||||
if(get_dist(listening_mob, turf_source) <= maxdistance)
|
||||
listening_mob.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance, 1, use_reverb)
|
||||
. += listening_mob
|
||||
|
||||
else //these sounds don't carry through walls
|
||||
listeners = get_hearers_in_view(maxdistance, turf_source)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user