From 8f7b483161c41a36b062e8a2bebe8f87f1b5067b Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Wed, 13 Jan 2021 21:37:30 -0700 Subject: [PATCH] remove reverb --- code/__DEFINES/movement.dm | 6 +++--- code/controllers/subsystem/jukeboxes.dm | 9 +++++++- code/datums/diseases/heart_failure.dm | 4 ++-- code/game/atoms_movable.dm | 2 +- code/game/sound.dm | 21 ++++++++++++++----- .../antagonists/changeling/changeling.dm | 2 +- .../antagonists/clockcult/clockcult.dm | 2 +- code/modules/antagonists/cult/cult.dm | 2 +- code/modules/antagonists/nukeop/nukeop.dm | 4 ++-- .../antagonists/traitor/datum_traitor.dm | 2 +- 10 files changed, 36 insertions(+), 18 deletions(-) diff --git a/code/__DEFINES/movement.dm b/code/__DEFINES/movement.dm index fa7eaeedca..718e8bed28 100644 --- a/code/__DEFINES/movement.dm +++ b/code/__DEFINES/movement.dm @@ -21,8 +21,8 @@ GLOBAL_VAR_INIT(glide_size_multiplier, 1.0) #endif /// Set appearance flags in vars -#if SMOOTH_MOVEMENT - #define SET_APPEARANCE_FLAGS(flags) appearance_flags = (flags | LONG_GLIDE) +#if (SMOOTH_MOVEMENT == TRUE) + #define SET_APPEARANCE_FLAGS(_flags) appearance_flags = (_flags | LONG_GLIDE) #else - #define SET_APPEARANCE_FLAGS(flags) appearance_flags = flags + #define SET_APPEARANCE_FLAGS(_flags) appearance_flags = _flags #endif diff --git a/code/controllers/subsystem/jukeboxes.dm b/code/controllers/subsystem/jukeboxes.dm index 0f7e2a6e80..7be6d44a7f 100644 --- a/code/controllers/subsystem/jukeboxes.dm +++ b/code/controllers/subsystem/jukeboxes.dm @@ -95,6 +95,8 @@ SUBSYSTEM_DEF(jukeboxes) continue var/sound/song_played = sound(juketrack.song_path) var/turf/currentturf = get_turf(jukebox) + var/area/currentarea = get_area(jukebox) + var/list/hearerscache = hearers(7, jukebox) song_played.falloff = jukeinfo[4] @@ -105,10 +107,15 @@ 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, 100, channel = jukeinfo[2], S = song_played, use_reverb = FALSE) + M.playsound_local(currentturf, null, 100, channel = jukeinfo[2], S = song_played, envwet = (inrange ? -250 : 0), envdry = (inrange ? 0 : -10000)) CHECK_TICK return diff --git a/code/datums/diseases/heart_failure.dm b/code/datums/diseases/heart_failure.dm index ddccee3661..952ce4f18d 100644 --- a/code/datums/diseases/heart_failure.dm +++ b/code/datums/diseases/heart_failure.dm @@ -37,7 +37,7 @@ to_chat(H, "You feel [pick("full", "nauseated", "sweaty", "weak", "tired", "short on breath", "uneasy")].") if(3 to 4) if(!sound) - H.playsound_local(H, 'sound/health/slowbeat.ogg', 40, FALSE, channel = CHANNEL_HEARTBEAT, use_reverb = FALSE) + H.playsound_local(H, 'sound/health/slowbeat.ogg', 40, FALSE, channel = CHANNEL_HEARTBEAT) sound = TRUE if(prob(3)) to_chat(H, "You feel a sharp pain in your chest!") @@ -53,7 +53,7 @@ H.emote("cough") if(5) H.stop_sound_channel(CHANNEL_HEARTBEAT) - H.playsound_local(H, 'sound/effects/singlebeat.ogg', 100, FALSE, use_reverb = FALSE) + H.playsound_local(H, 'sound/effects/singlebeat.ogg', 100, FALSE) if(H.stat == CONSCIOUS) H.visible_message("[H] clutches at [H.p_their()] chest as if [H.p_their()] heart is stopping!") H.adjustStaminaLoss(60) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 128995b5bc..febf791728 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -303,7 +303,7 @@ pulledby.stop_pulling() /atom/movable/proc/set_glide_size(target = 8, recursive = TRUE) -#if SMOOTH_MOVEMENT +#if (SMOOTH_MOVEMENT == TRUE) // SEND_SIGNAL(src, COMSIG_MOVABLE_UPDATE_GLIDE_SIZE, target) glide_size = target diff --git a/code/game/sound.dm b/code/game/sound.dm index 5c81f77830..e3ce88a620 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -41,7 +41,7 @@ falloff_distance - Distance at which falloff begins. Sound is at peak volume (in */ -/proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff_exponent = SOUND_FALLOFF_EXPONENT, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE, falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, use_reverb = TRUE) +/proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff_exponent = SOUND_FALLOFF_EXPONENT, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE, falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, envwet = -10000, envdry = 0) if(isarea(source)) CRASH("playsound(): source is an area") @@ -81,11 +81,11 @@ falloff_distance - Distance at which falloff begins. Sound is at peak volume (in for(var/P in listeners) var/mob/M = P if(get_dist(M, turf_source) <= maxdistance) - M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance) + M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance, null, envwet, envdry) for(var/P in SSmobs.dead_players_by_zlevel[source_z]) var/mob/M = P if(get_dist(M, turf_source) <= maxdistance) - M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance) + M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance, null, envwet, envdry) /*! playsound @@ -106,7 +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) +/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) if(!client || !can_hear()) return @@ -116,6 +116,9 @@ distance_multiplier - Can be used to multiply the distance at which the sound is S.wait = 0 //No queue S.channel = channel || SSsounds.random_available_channel() S.volume = vol + // CITADEL EDIT - Force citadel reverb + S.environment = 7 + // End if(vary) if(frequency) @@ -154,6 +157,10 @@ distance_multiplier - Can be used to multiply the distance at which the sound is S.volume *= pressure_factor //End Atmosphere affecting sound + /// Citadel edit - Citadel reverb + S.echo = list(envdry, null, envwet, null, null, null, null, null, null, null, null, null, null, 1, 1, 1, null, null) + /// End + if(S.volume <= 0) return //No sound @@ -164,8 +171,10 @@ distance_multiplier - Can be used to multiply the distance at which the sound is var/dy = (turf_source.z - T.z) * 5 * distance_multiplier // Hearing from above / below, multiplied by 5 because we assume height is further along coords. S.y = dy - S.falloff = max_distance || 1 //use max_distance, else just use 1 as we are a direct sound so falloff isnt relevant. + S.falloff = isnull(max_distance)? FALLOFF_SOUNDS : max_distance //use max_distance, else just use 1 as we are a direct sound so falloff isnt relevant. + /* + /// Tg reverb removed if(S.environment == SOUND_ENVIRONMENT_NONE) if(sound_environment_override != SOUND_ENVIRONMENT_NONE) S.environment = sound_environment_override @@ -181,6 +190,8 @@ distance_multiplier - Can be used to multiply the distance at which the sound is else S.echo[3] = 0 //Room setting, 0 means normal reverb S.echo[4] = 0 //RoomHF setting, 0 means normal reverb. + */ + /// SEND_SOUND(src, S) diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm index 28ec6c016e..7a34af4d13 100644 --- a/code/modules/antagonists/changeling/changeling.dm +++ b/code/modules/antagonists/changeling/changeling.dm @@ -358,7 +358,7 @@ to_chat(owner.current, "You are [changelingID], a changeling! You have absorbed and taken the form of a human.") to_chat(owner.current, "Use say \"[MODE_TOKEN_CHANGELING] message\" to communicate with your fellow changelings.") to_chat(owner.current, "You must complete the following tasks:") - owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ling_aler.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE) + owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ling_aler.ogg', 100, FALSE, pressure_affected = FALSE) owner.announce_objectives() diff --git a/code/modules/antagonists/clockcult/clockcult.dm b/code/modules/antagonists/clockcult/clockcult.dm index 0c25e28870..b6ed7dfe65 100644 --- a/code/modules/antagonists/clockcult/clockcult.dm +++ b/code/modules/antagonists/clockcult/clockcult.dm @@ -60,7 +60,7 @@ owner.current.visible_message("[owner.current]'s eyes glow a blazing yellow!", null, null, 7, owner.current) //don't show the owner this message to_chat(owner.current, "Assist your new companions in their righteous efforts. Your goal is theirs, and theirs yours. You serve the Clockwork \ Justiciar above all else. Perform his every whim without hesitation.") - owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/clockcultalr.ogg', 70, FALSE, pressure_affected = FALSE, use_reverb = FALSE) + owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/clockcultalr.ogg', 70, FALSE, pressure_affected = FALSE) /datum/antagonist/clockcult/on_gain() var/mob/living/current = owner.current diff --git a/code/modules/antagonists/cult/cult.dm b/code/modules/antagonists/cult/cult.dm index 2e8962178c..a2ec4a47a4 100644 --- a/code/modules/antagonists/cult/cult.dm +++ b/code/modules/antagonists/cult/cult.dm @@ -61,7 +61,7 @@ /datum/antagonist/cult/greet() to_chat(owner, "You are a member of the cult!") - owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/bloodcult.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE)//subject to change + owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/bloodcult.ogg', 100, FALSE, pressure_affected = FALSE)//subject to change owner.announce_objectives() /datum/antagonist/cult/on_gain() diff --git a/code/modules/antagonists/nukeop/nukeop.dm b/code/modules/antagonists/nukeop/nukeop.dm index c618edf862..652b19a8e7 100644 --- a/code/modules/antagonists/nukeop/nukeop.dm +++ b/code/modules/antagonists/nukeop/nukeop.dm @@ -43,7 +43,7 @@ return TRUE /datum/antagonist/nukeop/greet() - owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0, use_reverb = FALSE) + owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0) to_chat(owner, "You are a [nuke_team ? nuke_team.syndicate_name : "syndicate"] agent!") owner.announce_objectives() @@ -171,7 +171,7 @@ owner.current.real_name = "Syndicate [title]" /datum/antagonist/nukeop/leader/greet() - owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0, use_reverb = FALSE) + owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0) to_chat(owner, "You are the Syndicate [title] for this mission. You are responsible for the distribution of telecrystals and your ID is the only one who can open the launch bay doors.") to_chat(owner, "If you feel you are not up to this task, give your ID to another operative.") to_chat(owner, "In your hand you will find a special item capable of triggering a greater challenge for your team. Examine it carefully and consult with your fellow operatives before activating it.") diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index fa0876c324..47a9c59274 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -114,7 +114,7 @@ if(traitor_kind.finalize_traitor(src)) if(should_equip) equip(silent) - owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/tatoralert.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE) + owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/tatoralert.ogg', 100, FALSE, pressure_affected = FALSE) /datum/antagonist/traitor/antag_panel_objectives() . += "Traitor class: [traitor_kind.employer]
"