From fe4d8e2ea97f2b72c166d5856b6296579e87b1cf Mon Sep 17 00:00:00 2001 From: Tayrtahn Date: Fri, 23 May 2025 10:56:37 -0400 Subject: [PATCH] Cleanup warning in `NPCCombatSystem.Ranged` (#37751) Cleanup 1 warning in NPCCombatSystem.Ranged --- Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs | 2 +- Content.Server/NPC/Systems/NPCCombatSystem.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs b/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs index f4e312fbd4..74f992b27d 100644 --- a/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs +++ b/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs @@ -191,7 +191,7 @@ public sealed partial class NPCCombatSystem if (_mapManager.TryFindGridAt(xform.MapID, targetPos, out var gridUid, out var mapGrid)) { - targetCordinates = new EntityCoordinates(gridUid, mapGrid.WorldToLocal(targetSpot)); + targetCordinates = new EntityCoordinates(gridUid, _map.WorldToLocal(gridUid, mapGrid, targetSpot)); } else { diff --git a/Content.Server/NPC/Systems/NPCCombatSystem.cs b/Content.Server/NPC/Systems/NPCCombatSystem.cs index 7b012300da..9724917891 100644 --- a/Content.Server/NPC/Systems/NPCCombatSystem.cs +++ b/Content.Server/NPC/Systems/NPCCombatSystem.cs @@ -22,6 +22,7 @@ public sealed partial class NPCCombatSystem : EntitySystem [Dependency] private readonly InteractionSystem _interaction = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly NPCSteeringSystem _steering = default!; + [Dependency] private readonly SharedMapSystem _map = default!; [Dependency] private readonly SharedMeleeWeaponSystem _melee = default!; [Dependency] private readonly SharedTransformSystem _transform = default!; -- 2.51.2