From 1baee5f3063b1006a6ca3c942c2db65a35661af4 Mon Sep 17 00:00:00 2001 From: Jessica M Date: Sun, 19 Jun 2022 14:07:00 -0700 Subject: [PATCH] Spell sounds are no longer global, also tweaked volumes (#8961) --- Content.Server/Magic/Events/KnockSpellEvent.cs | 3 +-- Content.Server/Magic/Events/TeleportSpellEvent.cs | 7 +++++++ Content.Server/Magic/MagicSystem.cs | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Content.Server/Magic/Events/KnockSpellEvent.cs b/Content.Server/Magic/Events/KnockSpellEvent.cs index cc7d3fb9ed..328651f54c 100644 --- a/Content.Server/Magic/Events/KnockSpellEvent.cs +++ b/Content.Server/Magic/Events/KnockSpellEvent.cs @@ -17,8 +17,7 @@ public sealed class KnockSpellEvent : InstantActionEvent /// /// Volume control for the spell. - /// -6f is default because the base soundfile is really loud /// [DataField("knockVolume")] - public float KnockVolume = -6f; + public float KnockVolume = 5f; } diff --git a/Content.Server/Magic/Events/TeleportSpellEvent.cs b/Content.Server/Magic/Events/TeleportSpellEvent.cs index a0dc573377..8bbb027400 100644 --- a/Content.Server/Magic/Events/TeleportSpellEvent.cs +++ b/Content.Server/Magic/Events/TeleportSpellEvent.cs @@ -7,4 +7,11 @@ public sealed class TeleportSpellEvent : WorldTargetActionEvent { [DataField("blinkSound")] public SoundSpecifier BlinkSound = new SoundPathSpecifier("/Audio/Magic/blink.ogg"); + + + /// + /// Volume control for the spell. + /// + [DataField("blinkVolume")] + public float BlinkVolume = 5f; } diff --git a/Content.Server/Magic/MagicSystem.cs b/Content.Server/Magic/MagicSystem.cs index ddab1d2cb4..6ee0f01dcf 100644 --- a/Content.Server/Magic/MagicSystem.cs +++ b/Content.Server/Magic/MagicSystem.cs @@ -215,7 +215,7 @@ public sealed class MagicSystem : EntitySystem transform.WorldPosition = args.Target.Position; transform.AttachToGridOrMap(); - SoundSystem.Play(args.BlinkSound.GetSound(), Filter.Pvs(args.Target)); + SoundSystem.Play(args.BlinkSound.GetSound(), Filter.Pvs(args.Target), args.Performer, AudioParams.Default.WithVolume(args.BlinkVolume)); args.Handled = true; } @@ -232,7 +232,7 @@ public sealed class MagicSystem : EntitySystem var transform = Transform(args.Performer); var coords = transform.Coordinates; - SoundSystem.Play(args.KnockSound.GetSound(), Filter.Pvs(coords), AudioParams.Default.WithVolume(args.KnockVolume)); + SoundSystem.Play(args.KnockSound.GetSound(), Filter.Pvs(coords), args.Performer, AudioParams.Default.WithVolume(args.KnockVolume)); //Look for doors and don't open them if they're already open. foreach (var entity in _lookup.GetEntitiesInRange(coords, args.Range))