From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Thu, 20 Apr 2023 03:28:19 +0000 (+1000) Subject: Fix cargo FTL (#15557) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=7cd7b5091cc2c48108de4ba97e0f1840cb2ea70e;p=space-station-14.git Fix cargo FTL (#15557) --- diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs index a9b3be6393..7ef01d1ca4 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs @@ -503,7 +503,6 @@ public sealed partial class ShuttleSystem public bool TryFTLProximity(EntityUid shuttleUid, ShuttleComponent component, EntityUid targetUid, TransformComponent? xform = null, TransformComponent? targetXform = null) { if (!Resolve(targetUid, ref targetXform) || - targetXform.GridUid == null || targetXform.MapUid == null || !targetXform.MapUid.Value.IsValid() || !Resolve(shuttleUid, ref xform)) @@ -598,7 +597,7 @@ public sealed partial class ShuttleSystem } // TODO: This is pretty crude for multiple landings. - if (nearbyGrids.Count > 1 || !HasComp(targetXform.GridUid.Value)) + if (nearbyGrids.Count > 1 || !HasComp(targetXform.GridUid)) { var minRadius = (MathF.Max(targetAABB.Width, targetAABB.Height) + MathF.Max(shuttleAABB.Width, shuttleAABB.Height)) / 2f; spawnPos = targetAABB.Center + _random.NextVector2(minRadius, minRadius + 64f);