@@ -5,6 +5,7 @@ namespace Content.Server.Flash.Components
|
|||||||
[RegisterComponent, Access(typeof(FlashSystem))]
|
[RegisterComponent, Access(typeof(FlashSystem))]
|
||||||
public sealed partial class FlashComponent : Component
|
public sealed partial class FlashComponent : Component
|
||||||
{
|
{
|
||||||
|
|
||||||
[DataField("duration")]
|
[DataField("duration")]
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
public int FlashDuration { get; set; } = 5000;
|
public int FlashDuration { get; set; } = 5000;
|
||||||
@@ -23,7 +24,10 @@ namespace Content.Server.Flash.Components
|
|||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
[DataField("sound")]
|
[DataField("sound")]
|
||||||
public SoundSpecifier Sound { get; set; } = new SoundPathSpecifier("/Audio/Weapons/flash.ogg");
|
public SoundSpecifier Sound { get; set; } = new SoundPathSpecifier("/Audio/Weapons/flash.ogg")
|
||||||
|
{
|
||||||
|
Params = AudioParams.Default.WithVolume(1f).WithMaxDistance(3f)
|
||||||
|
};
|
||||||
|
|
||||||
public bool Flashing;
|
public bool Flashing;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ namespace Content.Server.Flash
|
|||||||
}
|
}
|
||||||
if (sound != null)
|
if (sound != null)
|
||||||
{
|
{
|
||||||
_audio.PlayPvs(sound, source);
|
_audio.PlayPvs(sound, source, AudioParams.Default.WithVolume(1f).WithMaxDistance(3f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user