]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix NPC line of sight not working if trying to ranged target a blocking entity (...
authorDrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
Sat, 20 Jul 2024 03:58:33 +0000 (20:58 -0700)
committerGitHub <noreply@github.com>
Sat, 20 Jul 2024 03:58:33 +0000 (13:58 +1000)
Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs

index 10ec54c895444aa0e788692052e642810cb5ebcd..d7196ea73c71dcb9602b12363dc170e057ca6477 100644 (file)
@@ -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)