From 8b8e83a08655a2e285c07e285d9aa13ccb9f11e2 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Sat, 11 Jan 2025 15:40:08 -0500 Subject: [PATCH] Remove NPC Stormtrooper Mode (#1500) # Description Fixes https://github.com/Simple-Station/Einstein-Engines/issues/1498 Funny trig errors go brrr. :cl: - fix: Fixed an issue where ranged NPCs were incapable of aiming. (cherry picked from commit 1f6e1cbfd3161aa2cf471783f87a967f93e49adf) --- Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs b/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs index f5591daa47..12e33b48a4 100644 --- a/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs +++ b/Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs @@ -189,9 +189,9 @@ private void UpdateRanged(float frameTime) EntityCoordinates targetCordinates; if (_mapManager.TryFindGridAt(xform.MapID, targetPos, out var gridUid, out var mapGrid)) - targetCordinates = new(gridUid, _map.WorldToLocal(comp.Target, mapGrid, targetSpot)); + targetCordinates = new EntityCoordinates(gridUid, mapGrid.WorldToLocal(targetSpot)); else - targetCordinates = new(xform.MapUid!.Value, targetSpot); + targetCordinates = new EntityCoordinates(xform.MapUid!.Value, targetSpot); comp.Status = CombatStatus.Normal;