From 2e770036456d7a6ede301ca05e387450c64e4761 Mon Sep 17 00:00:00 2001 From: Cojoke <83733158+Cojoke-dot@users.noreply.github.com> Date: Mon, 22 Jul 2024 17:24:26 -0500 Subject: [PATCH] Fix Freezing on throwing jetpack (#30223) * Fix Freezing on throwing jetpack * bweep(requested stuff) --- .../Hands/EntitySystems/SharedHandsSystem.Drop.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Drop.cs b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Drop.cs index 2e3c6f620344..0579e9972534 100644 --- a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Drop.cs +++ b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Drop.cs @@ -3,6 +3,7 @@ using Content.Shared.Interaction; using Content.Shared.Inventory.VirtualItem; using Content.Shared.Tag; +using Content.Shared.Interaction.Events; using Robust.Shared.Containers; using Robust.Shared.Map; @@ -125,15 +126,13 @@ public bool TryDrop(EntityUid uid, Hand hand, EntityCoordinates? targetDropLocat var userXform = Transform(uid); var isInContainer = ContainerSystem.IsEntityOrParentInContainer(uid, xform: userXform); + DoDrop(uid, hand, doDropInteraction: doDropInteraction, handsComp); + // drop the item inside the container if the user is in a container if (targetDropLocation == null || isInContainer) - { - TransformSystem.DropNextTo((entity, itemXform), (uid, userXform)); return true; - } // otherwise, remove the item from their hands and place it at the calculated interaction range position - DoDrop(uid, hand, doDropInteraction: doDropInteraction, handsComp); var (itemPos, itemRot) = TransformSystem.GetWorldPositionRotation(entity); var origin = new MapCoordinates(itemPos, itemXform.MapID); var target = TransformSystem.ToMapCoordinates(targetDropLocation.Value);