Skip to content

Commit

Permalink
Fix TTS channels (#208)
Browse files Browse the repository at this point in the history
## About The Pull Request
Теперь то оно должно работать? Забыли передавать канал

fixes #207
  • Loading branch information
larentoun committed Apr 22, 2024
1 parent b83f7b3 commit 873edb2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions modular_bandastation/tts/code/tts_subsystem.dm
Original file line number Diff line number Diff line change
Expand Up @@ -361,15 +361,12 @@ SUBSYSTEM_DEF(tts220)

var/sound/output = sound(filename2play)
output.status = SOUND_STREAM
output.volume = volume
if(!is_local || isnull(speaker))
output.wait = TRUE
output.volume = volume
output.environment = SOUND_ENVIRONMENT_NONE
output.channel = CHANNEL_TTS_RADIO

if(output.volume <= 0)
return

play_sfx_if_exists(listener, preSFX, output)
SEND_SOUND(listener, output)
play_sfx_if_exists(listener, postSFX, output)
Expand All @@ -384,7 +381,7 @@ SUBSYSTEM_DEF(tts220)
if(speaking_mob.client)
output.channel = get_local_channel_by_owner(speaker)
output.wait = TRUE
output = listener.playsound_local(turf_source, output, volume, wait = TRUE)
output = listener.playsound_local(turf_source, vol = output.volume, channel = output.channel, sound_to_use = output, wait = output.wait)

if(!output || output.volume <= 0)
return
Expand Down

0 comments on commit 873edb2

Please sign in to comment.