Revert "Predicted footstep sounds" (#7068)
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using Content.Shared.Audio;
|
||||
using Content.Shared.Sound;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Server.Movement.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Changes footstep sound
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class FootstepModifierComponent : Component
|
||||
{
|
||||
[DataField("footstepSoundCollection", required: true)]
|
||||
public SoundSpecifier SoundCollection = default!;
|
||||
|
||||
[DataField("variation")]
|
||||
public float Variation = default;
|
||||
|
||||
public void PlayFootstep()
|
||||
{
|
||||
SoundSystem.Play(Filter.Pvs(Owner), SoundCollection.GetSound(), IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(Owner).Coordinates, AudioHelpers.WithVariation(Variation).WithVolume(-2f));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user