From: Tayrtahn Date: Fri, 23 May 2025 14:56:37 +0000 (-0400) Subject: Cleanup warning in `NPCCombatSystem.Ranged` (#37751) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=fe4d8e2ea97f2b72c166d5856b6296579e87b1cf;p=space-station-14.git Cleanup warning in `NPCCombatSystem.Ranged` (#37751) Cleanup 1 warning in NPCCombatSystem.Ranged --- 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!;