WiP movement prediction.

This commit is contained in:
Pieter-Jan Briers
2020-06-24 02:21:20 +02:00
parent 822436bb81
commit da45a52325
48 changed files with 1101 additions and 540 deletions

View File

@@ -0,0 +1,26 @@
using Content.Shared.GameObjects.Components.Movement;
using Robust.Client.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map;
#nullable enable
namespace Content.Client.GameObjects.Components.Movement
{
[RegisterComponent]
[ComponentReference(typeof(IMoverComponent))]
public class PlayerInputMoverComponent : SharedPlayerInputMoverComponent, IMoverComponent
{
public override GridCoordinates LastPosition { get; set; }
public override float StepSoundDistance { get; set; }
public override void HandleComponentState(ComponentState? curState, ComponentState? nextState)
{
if (IoCManager.Resolve<IPlayerManager>().LocalPlayer!.ControlledEntity == Owner)
{
base.HandleComponentState(curState, nextState);
}
}
}
}