Fix ship ambience volume slider acting like an on/off switch (#90153)

## About The Pull Request

The code that uses the ship ambience volume slider uses the value in the
wrong SEND_SOUND call (one of the ones to stop the current playing
ambience) meaning the slider actually does nothing but toggle between
ship ambience being off and it being full volume. This fixes that

## Why It's Good For The Game

Volume make sound louder or quieter

## Changelog
🆑
fix: fixed the ship ambience volume slider not working properly
/🆑
This commit is contained in:
Roxy
2025-03-24 09:47:11 -04:00
committed by GitHub
parent 7eb3b5e6e0
commit e8f068519d

View File

@@ -117,7 +117,7 @@ SUBSYSTEM_DEF(ambience)
var/volume_modifier = client.prefs.read_preference(/datum/preference/numeric/volume/sound_ship_ambience_volume) var/volume_modifier = client.prefs.read_preference(/datum/preference/numeric/volume/sound_ship_ambience_volume)
if(!sound_to_use || !(client.prefs.read_preference(/datum/preference/numeric/volume/sound_ship_ambience_volume))) if(!sound_to_use || !(client.prefs.read_preference(/datum/preference/numeric/volume/sound_ship_ambience_volume)))
SEND_SOUND(src, sound(null, repeat = 0, volume = volume_modifier, wait = 0, channel = CHANNEL_BUZZ)) SEND_SOUND(src, sound(null, repeat = 0, wait = 0, channel = CHANNEL_BUZZ))
client.current_ambient_sound = null client.current_ambient_sound = null
return return
@@ -136,4 +136,4 @@ SUBSYSTEM_DEF(ambience)
return return
client.current_ambient_sound = sound_to_use client.current_ambient_sound = sound_to_use
SEND_SOUND(src, sound(my_area.ambient_buzz, repeat = 1, wait = 0, volume = my_area.ambient_buzz_vol, channel = CHANNEL_BUZZ)) SEND_SOUND(src, sound(my_area.ambient_buzz, repeat = 1, wait = 0, volume = my_area.ambient_buzz_vol * (volume_modifier / 100), channel = CHANNEL_BUZZ))