diff --git a/Content.Shared/Camera/SharedCameraRecoilSystem.cs b/Content.Shared/Camera/SharedCameraRecoilSystem.cs index a2ce0e77e20..1c19814bd96 100644 --- a/Content.Shared/Camera/SharedCameraRecoilSystem.cs +++ b/Content.Shared/Camera/SharedCameraRecoilSystem.cs @@ -1,4 +1,7 @@ using System.Numerics; +using Content.Shared.Hands.EntitySystems; +using Content.Shared.Item; +using Content.Shared.Telescope; using JetBrains.Annotations; using Robust.Shared.Network; using Robust.Shared.Serialization; @@ -30,6 +33,8 @@ public abstract class SharedCameraRecoilSystem : EntitySystem [Dependency] private readonly SharedEyeSystem _eye = default!; [Dependency] private readonly INetManager _net = default!; + [Dependency] private readonly SharedHandsSystem _hands = default!; + public override void Initialize() { @@ -38,7 +43,14 @@ public override void Initialize() private void OnCameraRecoilGetEyeOffset(Entity ent, ref GetEyeOffsetEvent args) { - args.Offset += ent.Comp.BaseOffset + ent.Comp.CurrentKick; + if (_hands.TryGetActiveItem(ent.Owner, out var item) && HasComp(item.Value)) + { + args.Offset += ent.Comp.BaseOffset; + } + else + { + args.Offset += ent.Comp.BaseOffset + ent.Comp.CurrentKick; + } } /// diff --git a/Content.Shared/Telescope/SharedTelescopeSystem.cs b/Content.Shared/Telescope/SharedTelescopeSystem.cs index f9c1ca0044b..51138c51e53 100644 --- a/Content.Shared/Telescope/SharedTelescopeSystem.cs +++ b/Content.Shared/Telescope/SharedTelescopeSystem.cs @@ -84,7 +84,7 @@ private void SetOffset(Entity ent, Vector2 offset, TelescopeCompon if (TryComp(ent, out CameraRecoilComponent? recoil)) { recoil.BaseOffset = offset; - _eye.SetOffset(ent, offset + recoil.CurrentKick, ent); + _eye.SetOffset(ent, offset, ent); } else {