Skip to content

Commit

Permalink
Merge pull request #220 from Fansana/fix-disposal-pipe-ejection
Browse files Browse the repository at this point in the history
Fix Disposal Pipes Ejection
  • Loading branch information
Fansana authored Oct 1, 2024
2 parents 0667d53 + 5f7e3f5 commit 562b201
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 562b201

Please sign in to comment.