From b12baedadab3177bb8148aca44c574ee15aeb77b Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Tue, 25 Jul 2017 20:50:16 -0400 Subject: [PATCH] ok there TG, let's let BYOND do something better... --- code/__DEFINES/sound.dm | 5 ----- code/game/sound.dm | 12 +----------- code/modules/spacepods/spacepod.dm | 2 +- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/code/__DEFINES/sound.dm b/code/__DEFINES/sound.dm index 712c57b3b3e..ef1db9a79bc 100644 --- a/code/__DEFINES/sound.dm +++ b/code/__DEFINES/sound.dm @@ -6,11 +6,6 @@ #define CHANNEL_BUZZ 1020 #define CHANNEL_AMBIENCE 1019 -//THIS SHOULD ALWAYS BE THE LOWEST ONE! -//KEEP IT UPDATED - -#define CHANNEL_HIGHEST_AVAILABLE 1018 - #define SOUND_MINIMUM_PRESSURE 10 #define FALLOFF_SOUNDS 0.5 \ No newline at end of file diff --git a/code/game/sound.dm b/code/game/sound.dm index fa313aa0476..56dd47ddb8d 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -24,9 +24,6 @@ var/list/growls = list('sound/goonstation/voice/growl1.ogg', 'sound/goonstation/ var/turf/turf_source = get_turf(source) - //allocate a channel if necessary now so its the same for everyone - channel = (channel ? channel : open_sound_channel()) - // 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 @@ -50,7 +47,7 @@ var/list/growls = list('sound/goonstation/voice/growl1.ogg', 'sound/goonstation/ S = sound(get_sfx(soundin)) S.wait = 0 //No queue - S.channel = (channel ? channel : open_sound_channel()) + S.channel = channel S.volume = vol if(vary) @@ -104,13 +101,6 @@ var/list/growls = list('sound/goonstation/voice/growl1.ogg', 'sound/goonstation/ if(prefs.sound & SOUND_LOBBY) src << sound(ticker.login_music, repeat = 0, wait = 0, volume = 85, channel = CHANNEL_LOBBYMUSIC) // MAD JAMS - -/proc/open_sound_channel() - var/static/next_channel = 1 //loop through the available 1024 - (the ones we reserve) channels and pray that its not still being used - . = ++next_channel - if(next_channel > CHANNEL_HIGHEST_AVAILABLE) - next_channel = 1 - /mob/proc/stop_sound_channel(chan) src << sound(null, repeat = 0, wait = 0, channel = chan) diff --git a/code/modules/spacepods/spacepod.dm b/code/modules/spacepods/spacepod.dm index e2a21f507fa..615b405daa2 100644 --- a/code/modules/spacepods/spacepod.dm +++ b/code/modules/spacepods/spacepod.dm @@ -284,7 +284,7 @@ return var/sound/S = sound(mysound) S.wait = 0 //No queue - S.channel = open_sound_channel() + S.channel = 0 S.volume = 50 for(var/mob/M in passengers | pilot) M << S