From 47a1b1d78fe75689d9ac96175fe5120ded9fa2e6 Mon Sep 17 00:00:00 2001 From: fernerr <35879136+fernerr@users.noreply.github.com> Date: Mon, 21 Oct 2019 21:19:33 +0200 Subject: [PATCH] Fixes mech sounds and other sound tweaks (#7220) Fixed mech sounds and some other sounds becoming garbled due to a random frequency being picked. Made gunshots and flashbangs be heard farther and through walls again and not just via line of sight. --- code/game/mecha/equipment/weapons/weapons.dm | 2 +- code/game/mecha/mecha.dm | 2 +- .../items/weapons/grenades/flashbang.dm | 2 +- code/game/sound.dm | 2 +- code/modules/projectiles/gun.dm | 6 +-- .../ferner-191021-coding_soundtweaks.yml | 42 +++++++++++++++++++ 6 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 html/changelogs/ferner-191021-coding_soundtweaks.yml diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 9ae7f26ec6e..043b4e1edc1 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -64,7 +64,7 @@ def_zone = H.zone_sel.selecting H.setMoveCooldown(fire_time) P.launch_projectile(target, def_zone, user, params) - playsound(chassis, fire_sound, fire_volume, 1) + playsound(chassis, fire_sound, fire_volume, 1, 5, 0.9, 1) /obj/item/mecha_parts/mecha_equipment/weapon/proc/reset_fire() set_ready_state(1) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 30023b9f8fb..dd8bafe8949 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1584,7 +1584,7 @@ file = 'sound/mecha/weapdestrnano.ogg' else - playsound(src.loc, file, 100, 0, -6.6, environment=1) // using padded room environment to reduce echo + playsound(src.loc, file, 50, 0, -6, 0, 0, 1) ///////////////// ///// Topic ///// diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index 7004a8d384d..6b681f01289 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -32,7 +32,7 @@ S.icon_state = "shield0" to_chat(M, "BANG") - playsound(src.loc, 'sound/weapons/flashbang.ogg', 50, 1, 5) + playsound(src.loc, 'sound/weapons/flashbang.ogg', 50, 1, 5, 0.9, 1) //Checking for protections var/eye_safety = 0 diff --git a/code/game/sound.dm b/code/game/sound.dm index ccdea05606a..02efac45606 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -173,7 +173,7 @@ var/list/footstepfx = list("defaultstep","concretestep","grassstep","dirtstep"," crash_with("[source] is an area and is trying to make the sound: [soundin]") return - var/sound/original_sound = playsound_get_sound(soundin, vol, falloff, get_rand_frequency(), environment) + var/sound/original_sound = playsound_get_sound(soundin, vol, falloff, 0, environment) if (!original_sound) crash_with("Could not construct original sound.") diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index d86366c64a9..aca93d083d0 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -335,7 +335,7 @@ if(silenced) playsound(src, fire_sound, 10, 1) else - playsound(src, fire_sound, 50, 1) + playsound(src, fire_sound, 75, 1, 5, 0.9, 1) if (muzzle_flash) set_light(muzzle_flash) @@ -378,7 +378,7 @@ if(silenced) playsound(user, fire_sound, 10, 1) else - playsound(user, fire_sound, 50, 1) + playsound(user, fire_sound, 75, 1, 5, 0.9, 1) if (playemote) if(reflex) @@ -490,7 +490,7 @@ if(silenced) playsound(user, fire_sound, 10, 1) else - playsound(user, fire_sound, 50, 1) + playsound(user, fire_sound, 75, 1, 5, 0.9, 1) in_chamber.on_hit(M) diff --git a/html/changelogs/ferner-191021-coding_soundtweaks.yml b/html/changelogs/ferner-191021-coding_soundtweaks.yml new file mode 100644 index 00000000000..676bb796767 --- /dev/null +++ b/html/changelogs/ferner-191021-coding_soundtweaks.yml @@ -0,0 +1,42 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Ferner + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Fixed mech sounds and some other sounds becoming horribly garbled when played." + - tweak: "Gunshots and flashbangs can now be heard farther and through walls again."