Merge pull request #4210 from Citadel-Station-13/upstream-merge-33185
[MIRROR] Adds quiet argument to playsound.
This commit is contained in:
+5
-2
@@ -1,4 +1,4 @@
|
||||
/proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff, frequency = null, channel = 0, pressure_affected = TRUE)
|
||||
/proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE)
|
||||
if(isarea(source))
|
||||
throw EXCEPTION("playsound(): source is an area")
|
||||
return
|
||||
@@ -11,7 +11,10 @@
|
||||
// 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) * 3
|
||||
for(var/P in GLOB.player_list)
|
||||
var/list/listeners = GLOB.player_list
|
||||
if(!ignore_walls) //these sounds don't carry through walls
|
||||
listeners = listeners & hearers(maxdistance,turf_source)
|
||||
for(var/P in listeners)
|
||||
var/mob/M = P
|
||||
if(!M || !M.client)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user