Spell sounds are no longer global, also tweaked volumes (#8961)

This commit is contained in:
Jessica M
2022-06-19 14:07:00 -07:00
committed by GitHub
parent ee9ba8d569
commit 1baee5f306
3 changed files with 10 additions and 4 deletions

View File

@@ -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))