]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix docking fallback (#25854)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Tue, 5 Mar 2024 07:07:17 +0000 (18:07 +1100)
committerGitHub <noreply@github.com>
Tue, 5 Mar 2024 07:07:17 +0000 (18:07 +1100)
Only thing that even triggers it atm is escape pods.

Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs

index 05bf7fc74d82b92196de913848bbd299ba7611db..7b0c1b7484aa7c05399ada32ed77ecdc081f30b6 100644 (file)
@@ -448,16 +448,12 @@ public sealed partial class ShuttleSystem
                  !HasComp<MapComponent>(target.EntityId))
         {
             var config = _dockSystem.GetDockingConfigAt(uid, target.EntityId, target, entity.Comp1.TargetAngle);
-            MapCoordinates mapCoordinates;
-            Angle targetAngle;
-            mapCoordinates = _transform.ToMapCoordinates(target);
+            var mapCoordinates = _transform.ToMapCoordinates(target);
 
             // Couldn't dock somehow so just fallback to regular position FTL.
             if (config == null)
             {
-                targetAngle = entity.Comp1.TargetAngle;
-                target = new EntityCoordinates(_mapManager.GetMapEntityId(mapCoordinates.MapId), mapCoordinates.Position);
-                _transform.SetCoordinates(uid, xform, target, rotation: targetAngle);
+                TryFTLProximity(uid, target.EntityId);
             }
             else
             {