Skip to content

Commit

Permalink
Fix docking fallback (#25854)
Browse files Browse the repository at this point in the history
Only thing that even triggers it atm is escape pods.

(cherry picked from commit bbb78807c43a9c22b08cf055339dbb74e8ab5d4c)
  • Loading branch information
metalgearsloth authored and DebugOk committed Mar 8, 2024
1 parent 132d026 commit c30ff6e
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -448,16 +448,12 @@ private void UpdateFTLArriving(Entity<FTLComponent, ShuttleComponent> entity)
!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
{
Expand Down

0 comments on commit c30ff6e

Please sign in to comment.