diff --git a/Content.Client/Corvax/TTS/TTSSystem.cs b/Content.Client/Corvax/TTS/TTSSystem.cs index a533abe3a4..348cecf9f6 100644 --- a/Content.Client/Corvax/TTS/TTSSystem.cs +++ b/Content.Client/Corvax/TTS/TTSSystem.cs @@ -47,7 +47,6 @@ public sealed class TTSSystem : EntitySystem private float _volume = 0f; private int _fileIdx = 0; - private Dictionary _filesToDelete = new(); public override void Initialize() { @@ -57,21 +56,6 @@ public override void Initialize() SubscribeNetworkEvent(OnPlayTTS); } - public override void Update(float frameTime) - { - base.Update(frameTime); - - if (_filesToDelete.Count > 0) - foreach (var key in _filesToDelete.Keys) - { - _filesToDelete[key] -= frameTime; - if (_filesToDelete[key] <= 0) - { - _filesToDelete.Remove(key); - } - } - } - public override void Shutdown() { base.Shutdown(); @@ -130,8 +114,7 @@ private void OnPlayTTS(PlayTTSEvent ev) _audio.PlayGlobal(soundPath, Filter.Local(), false); } - _filesToDelete.Add(filePath, 50); //удаление файла отложено на 50 секунд (приблизительно) - //_contentRoot.RemoveFile(filePath); + _contentRoot.RemoveFile(filePath); } private float AdjustVolume(bool isWhisper)