From 679fe3ce6cb7553fbbf1817ae757fb18c8d74dad Mon Sep 17 00:00:00 2001 From: Azarak Date: Tue, 8 Dec 2020 02:05:49 +0100 Subject: [PATCH] Cleans up old echo, tweaks new echo (#2076) * aa * Update jukeboxes.dm * Update jukeboxes.dm * Update jukeboxes.dm --- code/game/sound.dm | 11 +++++------ .../jukebox/code/controllers/subsystem/jukeboxes.dm | 9 +-------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/code/game/sound.dm b/code/game/sound.dm index f0ed1c7d0fb..6f85159e26f 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -106,8 +106,7 @@ distance_multiplier - Can be used to multiply the distance at which the sound is */ -///mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff_exponent = SOUND_FALLOFF_EXPONENT, channel = 0, pressure_affected = TRUE, sound/S, max_distance, falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, distance_multiplier = 1, use_reverb = TRUE) //ORIGINAL -/mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff_exponent = SOUND_FALLOFF_EXPONENT, channel = 0, pressure_affected = TRUE, sound/S, max_distance, falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, distance_multiplier = 1,envwet = -10000, envdry = 0, use_reverb = TRUE) //SKYRAT EDIT CHANGE - SOUND ECHO +/mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff_exponent = SOUND_FALLOFF_EXPONENT, channel = 0, pressure_affected = TRUE, sound/S, max_distance, falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, distance_multiplier = 1, use_reverb = TRUE) if(!client || !can_hear()) return @@ -150,8 +149,6 @@ distance_multiplier - Can be used to multiply the distance at which the sound is else //space pressure_factor = 0 - S.echo = list(envdry, null, envwet, null, null, null, null, null, null, null, null, null, null, 1, 1, 1, null, null) //SKYRAT CHANGE ADDITION - SOUND ECHO - if(distance <= 1) pressure_factor = max(pressure_factor, 0.15) //touching the source of the sound @@ -179,8 +176,10 @@ distance_multiplier - Can be used to multiply the distance at which the sound is S.environment = A.sound_environment if(use_reverb && S.environment != SOUND_ENVIRONMENT_NONE) //We have reverb, reset our echo setting - S.echo[3] = 0 //Room setting, 0 means normal reverb - S.echo[4] = 0 //RoomHF setting, 0 means normal reverb. + //S.echo[3] = 0 //Room setting, 0 means normal reverb //ORIGINAL + //S.echo[4] = 0 //RoomHF setting, 0 means normal reverb. //ORIGINAL + S.echo[3] = -1000 //Room setting, 0 means normal reverb //SKYRAT EDIT CHANGE + S.echo[4] = -1000 //RoomHF setting, 0 means normal reverb. //SKYRAT EDIT CHANGE SEND_SOUND(src, S) diff --git a/modular_skyrat/modules/jukebox/code/controllers/subsystem/jukeboxes.dm b/modular_skyrat/modules/jukebox/code/controllers/subsystem/jukeboxes.dm index f406f8337db..85756ccd4f8 100644 --- a/modular_skyrat/modules/jukebox/code/controllers/subsystem/jukeboxes.dm +++ b/modular_skyrat/modules/jukebox/code/controllers/subsystem/jukeboxes.dm @@ -96,9 +96,7 @@ SUBSYSTEM_DEF(jukeboxes) stack_trace("Nonexistant or invalid object associated with jukebox.") continue var/sound/song_played = sound(juketrack.song_path) - var/area/currentarea = get_area(jukebox) var/turf/currentturf = get_turf(jukebox) - var/list/hearerscache = hearers(7, jukebox) song_played.falloff = jukeinfo[4] @@ -109,16 +107,11 @@ SUBSYSTEM_DEF(jukeboxes) M.stop_sound_channel(jukeinfo[2]) continue - var/inrange = FALSE if(jukebox.z == M.z) //todo - expand this to work with mining planet z-levels when robust jukebox audio gets merged to master song_played.status = SOUND_UPDATE - if(get_area(M) == currentarea) - inrange = TRUE - else if(M in hearerscache) - inrange = TRUE else song_played.status = SOUND_MUTE | SOUND_UPDATE //Setting volume = 0 doesn't let the sound properties update at all, which is lame. - M.playsound_local(currentturf, null, jukebox.volume, channel = jukeinfo[2], S = song_played, envwet = (inrange ? -250 : 0), envdry = (inrange ? 0 : -10000)) + M.playsound_local(currentturf, null, jukebox.volume, channel = jukeinfo[2], S = song_played) CHECK_TICK return