From 705dd5beff4d634dc8e499d5af0c4ad42bb2132d Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 26 Jan 2022 14:07:45 +1100 Subject: [PATCH] Fix weh spam (#6312) --- Content.Server/Sound/EmitSoundSystem.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content.Server/Sound/EmitSoundSystem.cs b/Content.Server/Sound/EmitSoundSystem.cs index 46b8b9bc8b..980245a281 100644 --- a/Content.Server/Sound/EmitSoundSystem.cs +++ b/Content.Server/Sound/EmitSoundSystem.cs @@ -34,6 +34,9 @@ namespace Content.Server.Sound private void HandleEmitSoundOnUseInHand(EntityUid eUI, BaseEmitSoundComponent component, UseInHandEvent arg) { + if (arg.Handled) return; + + arg.Handled = true; TryEmitSound(component); } @@ -44,6 +47,9 @@ namespace Content.Server.Sound private void HandleEmitSoundOnActivateInWorld(EntityUid eUI, BaseEmitSoundComponent component, ActivateInWorldEvent arg) { + if (arg.Handled) return; + + arg.Handled = true; TryEmitSound(component); }