mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-01 00:27:59 +00:00
29 lines
883 B
C#
29 lines
883 B
C#
using System.Numerics;
|
|
using Content.Client.Movement.Components;
|
|
using Content.Client.Movement.Systems;
|
|
using Content.Shared._DV.Movement;
|
|
using Robust.Client.Timing;
|
|
|
|
namespace Content.Client._DV.Movement;
|
|
|
|
public sealed class CursorOffsetActionSystem : SharedCursorOffsetActionSystem
|
|
{
|
|
[Dependency] private readonly EyeCursorOffsetSystem _eyeOffset = default!;
|
|
[Dependency] private readonly IClientGameTiming _gameTiming = default!;
|
|
|
|
protected override void OnAction(Entity<CursorOffsetActionComponent> ent, ref CursorOffsetActionEvent args)
|
|
{
|
|
base.OnAction(ent, ref args);
|
|
|
|
if (!TryComp<EyeCursorOffsetComponent>(ent, out var eyeOffset))
|
|
return;
|
|
|
|
eyeOffset.Enabled = ent.Comp.Active;
|
|
|
|
if (_gameTiming.IsFirstTimePredicted)
|
|
eyeOffset.CurrentPosition = Vector2.Zero;
|
|
|
|
Log.Info("im gonna cri");
|
|
}
|
|
}
|