From f3ef50c1d9cf1dbbb9b93ea7a6763eb5b31086cf Mon Sep 17 00:00:00 2001 From: Galactic Chimp Date: Mon, 12 Jul 2021 13:45:35 +0200 Subject: [PATCH] emitsoundsystem tweak --- Content.Server/Sound/EmitSoundSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/Sound/EmitSoundSystem.cs b/Content.Server/Sound/EmitSoundSystem.cs index 240ee28f3d..e397d51d01 100644 --- a/Content.Server/Sound/EmitSoundSystem.cs +++ b/Content.Server/Sound/EmitSoundSystem.cs @@ -50,9 +50,9 @@ namespace Content.Server.Sound private static void TryEmitSound(BaseEmitSoundComponent component) { - if (!string.IsNullOrWhiteSpace(component.Sound.GetSound())) + if (component.Sound.TryGetSound(out var sound)) { - SoundSystem.Play(Filter.Pvs(component.Owner), component.Sound.GetSound(), component.Owner, AudioHelpers.WithVariation(component.PitchVariation).WithVolume(-2f)); + SoundSystem.Play(Filter.Pvs(component.Owner), sound, component.Owner, AudioHelpers.WithVariation(component.PitchVariation).WithVolume(-2f)); } else {