emitsoundsystem tweak
This commit is contained in:
parent
aff9d99dc7
commit
f3ef50c1d9
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue