Adds quiet argument to playsound. (#33185)
* Adds quiet argument to playsound. * argument name change
This commit is contained in:
committed by
CitadelStationBot
parent
985c8ea86b
commit
2587b99a69
+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