From: DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com> Date: Sat, 20 Jul 2024 03:58:33 +0000 (-0700) Subject: Fix NPC line of sight not working if trying to ranged target a blocking entity (... X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=4aba9ec131a0fc716f985cff6476b6755df49e8c;p=space-station-14.git Fix NPC line of sight not working if trying to ranged target a blocking entity (#30055) --- diff --git a/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs b/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs index 10ec54c895..d7196ea73c 100644 --- a/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs +++ b/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs @@ -1,7 +1,6 @@ using Content.Server.NPC.Components; using Content.Shared.CombatMode; using Content.Shared.Interaction; -using Content.Shared.Physics; using Content.Shared.Weapons.Ranged.Components; using Content.Shared.Weapons.Ranged.Events; using Robust.Shared.Map; @@ -134,7 +133,7 @@ public sealed partial class NPCCombatSystem { comp.LOSAccumulator += UnoccludedCooldown; // For consistency with NPC steering. - comp.TargetInLOS = _interaction.InRangeUnobstructed(uid, Transform(comp.Target).Coordinates, distance + 0.1f); + comp.TargetInLOS = _interaction.InRangeUnobstructed(uid, comp.Target, distance + 0.1f); } if (!comp.TargetInLOS)