Don't play empty gun sounds (#9286)

This commit is contained in:
metalgearsloth
2022-06-29 23:31:09 +10:00
committed by GitHub
parent ed6e07e941
commit 07a1576518

View File

@@ -204,7 +204,7 @@ public sealed partial class GunSystem : SharedGunSystem
protected override void PlaySound(EntityUid gun, string? sound, EntityUid? user = null)
{
if (sound == null || user == null || !Timing.IsFirstTimePredicted) return;
if (string.IsNullOrEmpty(sound) || user == null || !Timing.IsFirstTimePredicted) return;
SoundSystem.Play(sound, Filter.Local(), gun);
}