Skip to content

Commit

Permalink
Fix: move play tts callback creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bizzonium committed Aug 23, 2023
1 parent 92cf003 commit d41fc39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modular_ss220/modules/tts/code/tts_subsystem.dm
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,14 @@ SUBSYSTEM_DEF(ttsSilero)
var/hash = rustg_hash_string(RUSTG_HASH_MD5, lowertext(text))
var/filename = "sound/tts_cache/[seed.name]/[hash]"

var/datum/callback/play_tts_cb = CALLBACK(src, PROC_REF(play_tts), speaker, listener, filename, is_local, effect, preSFX, postSFX)

if(fexists("[filename].ogg"))
tts_reused++
tts_rrps_counter++
play_tts(speaker, listener, filename, is_local, effect, preSFX, postSFX)
return

var/datum/callback/play_tts_cb = CALLBACK(src, PROC_REF(play_tts), speaker, listener, filename, is_local, effect, preSFX, postSFX)

if(LAZYLEN(tts_queue[filename]))
tts_reused++
tts_rrps_counter++
Expand Down

0 comments on commit d41fc39

Please sign in to comment.