Fix DockingControl (#21238)

This commit is contained in:
metalgearsloth
2023-10-26 00:28:34 +11:00
committed by GitHub
parent 07a956e790
commit 80c57170e9

View File

@@ -89,7 +89,7 @@ public class DockingControl : Control
// Draw the fixtures around the dock before drawing it
if (_entManager.TryGetComponent<FixturesComponent>(GridEntity, out var fixtures))
{
foreach (var (_, fixture) in fixtures.Fixtures)
foreach (var fixture in fixtures.Fixtures.Values)
{
var poly = (PolygonShape) fixture.Shape;
@@ -151,7 +151,7 @@ public class DockingControl : Control
var xformQuery = _entManager.GetEntityQuery<TransformComponent>();
_grids.Clear();
_mapManager.FindGridsIntersecting(gridXform.MapID, new Box2(worldPos - RangeVector, worldPos + RangeVector));
_mapManager.FindGridsIntersecting(gridXform.MapID, new Box2(worldPos - RangeVector, worldPos + RangeVector), ref _grids);
foreach (var grid in _grids)
{