diff --git a/Content.Server/GameObjects/EntitySystems/PointingSystem.cs b/Content.Server/GameObjects/EntitySystems/PointingSystem.cs index 016d92312e..0569600e7b 100644 --- a/Content.Server/GameObjects/EntitySystems/PointingSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/PointingSystem.cs @@ -1,6 +1,7 @@ -#nullable enable +#nullable enable using System; using System.Collections.Generic; +using Content.Server.GameObjects.Components.Observer; using Content.Server.GameObjects.Components.Pointing; using Content.Server.Players; using Content.Shared.GameObjects.EntitySystems; @@ -79,7 +80,13 @@ namespace Content.Server.GameObjects.EntitySystems public bool InRange(IEntity pointer, EntityCoordinates coordinates) { - return pointer.InRangeUnOccluded(coordinates, 15, e => e == pointer); + if (pointer.HasComponent()){ + return pointer.Transform.Coordinates.InRange(EntityManager, coordinates, 15); + } + else + { + return pointer.InRangeUnOccluded(coordinates, 15, e => e == pointer); + } } public bool TryPoint(ICommonSession? session, EntityCoordinates coords, EntityUid uid)