Skip to content

Commit

Permalink
Merge pull request #176 from SpicyDarkFox/dbg
Browse files Browse the repository at this point in the history
откат правок в ттс
  • Loading branch information
Evgencheg authored Sep 21, 2024
2 parents d9e16aa + ff12b22 commit c193140
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions Content.Client/Corvax/TTS/TTSSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public sealed class TTSSystem : EntitySystem

private float _volume = 0f;
private int _fileIdx = 0;
private Dictionary<ResPath, float> _filesToDelete = new();

public override void Initialize()
{
Expand All @@ -57,21 +56,6 @@ public override void Initialize()
SubscribeNetworkEvent<PlayTTSEvent>(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();
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c193140

Please sign in to comment.