Skip to content

Commit

Permalink
Remove NPC Stormtrooper Mode (#1500)
Browse files Browse the repository at this point in the history
# Description

Fixes Simple-Station/Einstein-Engines#1498

Funny trig errors go brrr.

:cl:
- fix: Fixed an issue where ranged NPCs were incapable of aiming.

(cherry picked from commit 1f6e1cbfd3161aa2cf471783f87a967f93e49adf)
  • Loading branch information
VMSolidus authored and Spatison committed Jan 13, 2025
1 parent f72308d commit 8b8e83a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Content.Server/NPC/Systems/NPCCombatSystem.Ranged.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 8b8e83a

Please sign in to comment.