Skip to content

Commit

Permalink
Update DisposableSystem.cs
Browse files Browse the repository at this point in the history
Fix Disposal Pipes Ejection from Fansana

Fansana/floofstation1#220
  • Loading branch information
Suraru committed Nov 11, 2024
1 parent a889262 commit 24b9206
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 24b9206

Please sign in to comment.