Fix camera recoil system overriding all other eye offsets (#29146)

This commit is contained in:
DrSmugleaf
2024-07-02 19:51:16 -07:00
committed by GitHub
parent ae4cff4982
commit c6d718d126
3 changed files with 59 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
using System.Numerics;
using Content.Shared.Administration;
using Content.Shared.Administration.Managers;
using Content.Shared.Camera;
using Content.Shared.Ghost;
using Content.Shared.Input;
using Content.Shared.Movement.Components;
@@ -128,6 +129,13 @@ public abstract class SharedContentEyeSystem : EntitySystem
Dirty(uid, component);
}
public void UpdateEyeOffset(Entity<EyeComponent?> eye)
{
var ev = new GetEyeOffsetEvent();
RaiseLocalEvent(eye, ref ev);
_eye.SetOffset(eye, ev.Offset, eye);
}
/// <summary>
/// Sendable from client to server to request a target zoom.
/// </summary>