Remove transform methods from mapgrid (#12233)
This commit is contained in:
@@ -90,17 +90,19 @@ namespace Content.Server.Shuttles.Systems
|
||||
var enlargedAABB = aabb.Value.Enlarged(DockingRadius * 1.5f);
|
||||
|
||||
// Get any docking ports in range on other grids.
|
||||
_mapManager.FindGridsIntersectingEnumerator(dockingXform.MapID, enlargedAABB, out var enumerator);
|
||||
|
||||
while (enumerator.MoveNext(out var otherGrid))
|
||||
foreach (var otherGrid in _mapManager.FindGridsIntersecting(dockingXform.MapID, enlargedAABB))
|
||||
{
|
||||
if (otherGrid.GridEntityId == dockingXform.GridUid) continue;
|
||||
if (otherGrid.GridEntityId == dockingXform.GridUid)
|
||||
continue;
|
||||
|
||||
foreach (var ent in otherGrid.GetAnchoredEntities(enlargedAABB))
|
||||
{
|
||||
if (!TryComp(ent, out DockingComponent? otherDocking) ||
|
||||
!otherDocking.Enabled ||
|
||||
!TryComp(ent, out PhysicsComponent? otherBody)) continue;
|
||||
!TryComp(ent, out PhysicsComponent? otherBody))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var otherTransform = otherBody.GetTransform();
|
||||
var otherDockingFixture = _fixtureSystem.GetFixtureOrNull(otherBody, DockingFixture);
|
||||
|
||||
@@ -90,9 +90,12 @@ public sealed partial class ShuttleSystem
|
||||
reason = null;
|
||||
|
||||
if (!TryComp<IMapGridComponent>(uid, out var grid) ||
|
||||
!Resolve(uid.Value, ref xform)) return true;
|
||||
!Resolve(uid.Value, ref xform))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var bounds = grid.Grid.WorldAABB.Enlarged(ShuttleFTLRange);
|
||||
var bounds = xform.WorldMatrix.TransformBox(grid.Grid.LocalAABB).Enlarged(ShuttleFTLRange);
|
||||
var bodyQuery = GetEntityQuery<PhysicsComponent>();
|
||||
|
||||
foreach (var other in _mapManager.FindGridsIntersecting(xform.MapID, bounds))
|
||||
|
||||
Reference in New Issue
Block a user