From a44be0f2b83724ffb948f0fa552a5cbd3ccfc696 Mon Sep 17 00:00:00 2001 From: metalgearsloth Date: Thu, 12 Sep 2024 12:54:57 +1000 Subject: [PATCH] Update --- .../Shuttles/Systems/ShuttleSystem.FasterThanLight.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs index 8f0078010b625e..e544c1538d15b6 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs @@ -956,8 +956,11 @@ private void Smimsh(EntityUid uid, FixturesComponent? manager = null, MapGridCom if (!Resolve(uid, ref manager, ref grid, ref xform) || xform.MapUid == null) return; + if (!TryComp(xform.MapUid, out BroadphaseComponent? lookup)) + return; + // Flatten anything not parented to a grid. - var transform = _physics.GetPhysicsTransform(uid, xform); + var transform = _physics.GetRelativePhysicsTransform((uid, xform), xform.MapUid.Value); var aabbs = new List(manager.Fixtures.Count); var tileSet = new List<(Vector2i, Tile)>(); @@ -979,7 +982,7 @@ private void Smimsh(EntityUid uid, FixturesComponent? manager = null, MapGridCom _lookupEnts.Clear(); _immuneEnts.Clear(); // TODO: Ideally we'd query first BEFORE moving grid but needs adjustments above. - _lookup.GetEntitiesIntersecting(xform.MapID, fixture.Shape, transform, _lookupEnts, LookupFlags.Uncontained); + _lookup.GetLocalEntitiesIntersecting(xform.MapUid.Value, fixture.Shape, transform, _lookupEnts, flags: LookupFlags.Uncontained, lookup: lookup); foreach (var ent in _lookupEnts) {