Skip to content

Commit

Permalink
fix disposal pipes ejection
Browse files Browse the repository at this point in the history
  • Loading branch information
Fansana committed Oct 1, 2024
1 parent cbe8841 commit 5f7e3f5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ public void ExitDisposals(EntityUid uid, DisposalHolderComponent? holder = null,
{
_xformSystem.AttachToGridOrMap(entity, xform);

if (holder.PreviousDirection != Direction.Invalid && _xformQuery.TryGetComponent(xform.ParentUid, out var parentXform))
if (holder.PreviousDirection != Direction.Invalid && gridUid != null && _xformQuery.TryGetComponent(gridUid, out var parentXform))
{
var direction = holder.PreviousDirection.ToAngle();
var direction = holder.CurrentDirection.ToAngle();
direction += _xformSystem.GetWorldRotation(parentXform);
_throwing.TryThrow(entity, direction.ToWorldVec() * 3f, 10f);
}
Expand Down

0 comments on commit 5f7e3f5

Please sign in to comment.