Spell sounds are no longer global, also tweaked volumes (#8961)
This commit is contained in:
@@ -17,8 +17,7 @@ public sealed class KnockSpellEvent : InstantActionEvent
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Volume control for the spell.
|
/// Volume control for the spell.
|
||||||
/// -6f is default because the base soundfile is really loud
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("knockVolume")]
|
[DataField("knockVolume")]
|
||||||
public float KnockVolume = -6f;
|
public float KnockVolume = 5f;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,4 +7,11 @@ public sealed class TeleportSpellEvent : WorldTargetActionEvent
|
|||||||
{
|
{
|
||||||
[DataField("blinkSound")]
|
[DataField("blinkSound")]
|
||||||
public SoundSpecifier BlinkSound = new SoundPathSpecifier("/Audio/Magic/blink.ogg");
|
public SoundSpecifier BlinkSound = new SoundPathSpecifier("/Audio/Magic/blink.ogg");
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Volume control for the spell.
|
||||||
|
/// </summary>
|
||||||
|
[DataField("blinkVolume")]
|
||||||
|
public float BlinkVolume = 5f;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ public sealed class MagicSystem : EntitySystem
|
|||||||
|
|
||||||
transform.WorldPosition = args.Target.Position;
|
transform.WorldPosition = args.Target.Position;
|
||||||
transform.AttachToGridOrMap();
|
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;
|
args.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ public sealed class MagicSystem : EntitySystem
|
|||||||
var transform = Transform(args.Performer);
|
var transform = Transform(args.Performer);
|
||||||
var coords = transform.Coordinates;
|
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.
|
//Look for doors and don't open them if they're already open.
|
||||||
foreach (var entity in _lookup.GetEntitiesInRange(coords, args.Range))
|
foreach (var entity in _lookup.GetEntitiesInRange(coords, args.Range))
|
||||||
|
|||||||
Reference in New Issue
Block a user