Remove 700 usages of Component.Owner (#21100)
This commit is contained in:
@@ -5,7 +5,6 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Administration.Managers;
|
||||
using Content.Server.Destructible;
|
||||
using Content.Server.NPC.HTN;
|
||||
using Content.Server.NPC.Systems;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.NPC;
|
||||
@@ -577,9 +576,10 @@ namespace Content.Server.NPC.Pathfinding
|
||||
{
|
||||
var msg = new PathBreadcrumbsMessage();
|
||||
|
||||
foreach (var comp in EntityQuery<GridPathfindingComponent>(true))
|
||||
var query = AllEntityQuery<GridPathfindingComponent>();
|
||||
while (query.MoveNext(out var uid, out var comp))
|
||||
{
|
||||
var netGrid = GetNetEntity(comp.Owner);
|
||||
var netGrid = GetNetEntity(uid);
|
||||
|
||||
msg.Breadcrumbs.Add(netGrid, new Dictionary<Vector2i, List<PathfindingBreadcrumb>>(comp.Chunks.Count));
|
||||
|
||||
@@ -626,9 +626,10 @@ namespace Content.Server.NPC.Pathfinding
|
||||
{
|
||||
var msg = new PathPolysMessage();
|
||||
|
||||
foreach (var comp in EntityQuery<GridPathfindingComponent>(true))
|
||||
var query = AllEntityQuery<GridPathfindingComponent>();
|
||||
while (query.MoveNext(out var uid, out var comp))
|
||||
{
|
||||
var netGrid = GetNetEntity(comp.Owner);
|
||||
var netGrid = GetNetEntity(uid);
|
||||
|
||||
msg.Polys.Add(netGrid, new Dictionary<Vector2i, Dictionary<Vector2i, List<DebugPathPoly>>>(comp.Chunks.Count));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user