]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix cargo FTL (#15557)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Thu, 20 Apr 2023 03:28:19 +0000 (13:28 +1000)
committerGitHub <noreply@github.com>
Thu, 20 Apr 2023 03:28:19 +0000 (13:28 +1000)
Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs

index a9b3be6393f67a114a976bd938fd6ce73df4c0d1..7ef01d1ca48610057acc1962b749d6c4af4cab94 100644 (file)
@@ -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<MapComponent>(targetXform.GridUid.Value))
+        if (nearbyGrids.Count > 1 || !HasComp<MapComponent>(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);