From 24b9206e26d7713604a781bb544ed5dbb6c738d0 Mon Sep 17 00:00:00 2001 From: Suraru Harlan <41290202+Suraru@users.noreply.github.com> Date: Mon, 11 Nov 2024 14:32:15 -0600 Subject: [PATCH] Update DisposableSystem.cs Fix Disposal Pipes Ejection from Fansana https://github.com/Fansana/floofstation1/pull/220 --- .../Disposal/Unit/EntitySystems/DisposableSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Server/Disposal/Unit/EntitySystems/DisposableSystem.cs b/Content.Server/Disposal/Unit/EntitySystems/DisposableSystem.cs index 38e3923803..ddc1b754a0 100644 --- a/Content.Server/Disposal/Unit/EntitySystems/DisposableSystem.cs +++ b/Content.Server/Disposal/Unit/EntitySystems/DisposableSystem.cs @@ -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); }