From d19dd8f2e10f6ed5a60fb32b17ae9ab2f62a31df Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Fri, 10 Apr 2020 06:36:42 -0700 Subject: [PATCH] fixes baystruments (#11790) * fix * sigh --- code/__DEFINES/instruments.dm | 2 +- code/modules/client/asset_cache.dm | 2 +- code/modules/instruments/songs/_song.dm | 4 ++-- code/modules/instruments/songs/play_synthesized.dm | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/__DEFINES/instruments.dm b/code/__DEFINES/instruments.dm index a72976faf5..3c414f87f4 100644 --- a/code/__DEFINES/instruments.dm +++ b/code/__DEFINES/instruments.dm @@ -19,7 +19,7 @@ #define INSTRUMENT_EXP_FALLOFF_MAX 10 /// Minimum volume for when the sound is considered dead. -#define INSTRUMENT_MIN_SUSTAIN_DROPOFF 30 +#define INSTRUMENT_MIN_SUSTAIN_DROPOFF 0 #define SUSTAIN_LINEAR 1 #define SUSTAIN_EXPONENTIAL 2 diff --git a/code/modules/client/asset_cache.dm b/code/modules/client/asset_cache.dm index d78152acd3..6f62701590 100644 --- a/code/modules/client/asset_cache.dm +++ b/code/modules/client/asset_cache.dm @@ -529,7 +529,7 @@ GLOBAL_LIST_EMPTY(asset_datums) "pill21" = 'icons/UI_Icons/Pills/pill21.png', "pill22" = 'icons/UI_Icons/Pills/pill22.png', ) - + /datum/asset/simple/IRV assets = list( "jquery-ui.custom-core-widgit-mouse-sortable-min.js" = 'html/IRV/jquery-ui.custom-core-widgit-mouse-sortable-min.js', diff --git a/code/modules/instruments/songs/_song.dm b/code/modules/instruments/songs/_song.dm index 517ee5e49a..67feb14457 100644 --- a/code/modules/instruments/songs/_song.dm +++ b/code/modules/instruments/songs/_song.dm @@ -60,7 +60,7 @@ * Compilation happens when we start playing and is cleared after we finish playing. */ var/list/compiled_chords - /// Channel as text = current volume + /// Channel as text = current volume percentage but it's 0 to 100 instead of 0 to 1. var/list/channels_playing = list() /// List of channels that aren't being used, as text. This is to prevent unnecessary freeing and reallocations from SSsounds/SSinstruments. var/list/channels_idle = list() @@ -237,7 +237,7 @@ cached_exponential_dropoff = sustain_exponential_dropoff // Linear, not so much, since it's a target duration from 100 volume rather than an exponential rate. var/target_duration = sustain_linear_duration - var/volume_diff = max(0, volume - sustain_dropoff_volume) + var/volume_diff = max(0, 100 - sustain_dropoff_volume) var/volume_decrease_per_decisecond = volume_diff / target_duration cached_linear_dropoff = volume_decrease_per_decisecond diff --git a/code/modules/instruments/songs/play_synthesized.dm b/code/modules/instruments/songs/play_synthesized.dm index 4da9c70e68..2573da324a 100644 --- a/code/modules/instruments/songs/play_synthesized.dm +++ b/code/modules/instruments/songs/play_synthesized.dm @@ -76,7 +76,7 @@ copy.frequency = K.frequency copy.volume = volume var/channel_text = num2text(channel) - channels_playing[channel_text] = volume + channels_playing[channel_text] = 100 last_channel_played = channel_text for(var/i in hearing_mobs) var/mob/M = i @@ -132,4 +132,4 @@ else for(var/i in hearing_mobs) var/mob/M = i - M.set_sound_channel_volume(channelnumber, current_volume) + M.set_sound_channel_volume(channelnumber, (current_volume * 0.01) * volume * using_instrument.volume_multiplier)