From 53137cb52794b4f9f85c3f976bd09dca5d523f53 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sat, 9 Jul 2022 15:20:23 +1000 Subject: [PATCH] Fix nearby warping (#9565) --- Content.Server/Shuttles/Systems/ShuttleSystem.Hyperspace.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.Hyperspace.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.Hyperspace.cs index a6dc433c7a..97d3f3e00b 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.Hyperspace.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.Hyperspace.cs @@ -251,7 +251,8 @@ public sealed partial class ShuttleSystem private bool TryHyperspaceDock(ShuttleComponent component, EntityUid targetUid) { if (!TryComp(component.Owner, out var xform) || - !TryComp(targetUid, out var targetXform)) return false; + !TryComp(targetUid, out var targetXform) || + targetXform.MapUid == null) return false; var config = GetDockingConfig(component, targetUid); @@ -291,7 +292,7 @@ public sealed partial class ShuttleSystem shuttleBody.AngularVelocity = 0f; } - xform.WorldPosition = spawnPos; + xform.Coordinates = new EntityCoordinates(targetXform.MapUid.Value, spawnPos); xform.WorldRotation = _random.NextAngle(); return false; }