Predicted footstep sounds (#7060)

This commit is contained in:
metalgearsloth
2022-03-11 12:48:03 +11:00
committed by GitHub
parent b9bc1ebebe
commit f1e6a352a8
8 changed files with 168 additions and 177 deletions

View File

@@ -3,15 +3,16 @@ using Content.Shared.Movement;
using Content.Shared.Movement.Components;
using Content.Shared.Pulling.Components;
using Robust.Client.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Shared.Physics;
using Robust.Shared.Player;
using Robust.Shared.Timing;
namespace Content.Client.Physics.Controllers
{
public sealed class MoverController : SharedMoverController
{
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
public override void UpdateBeforeSolve(bool prediction, float frameTime)
@@ -76,5 +77,15 @@ namespace Content.Client.Physics.Controllers
HandleKinematicMovement(mover, body);
}
protected override Filter GetSoundPlayers(EntityUid mover)
{
return Filter.Local();
}
protected override bool CanSound()
{
return _timing.IsFirstTimePredicted;
}
}
}