]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix Freezing on throwing jetpack (#30223)
authorCojoke <83733158+Cojoke-dot@users.noreply.github.com>
Mon, 22 Jul 2024 22:24:26 +0000 (17:24 -0500)
committerGitHub <noreply@github.com>
Mon, 22 Jul 2024 22:24:26 +0000 (18:24 -0400)
* Fix Freezing on throwing jetpack

* bweep(requested stuff)

Content.Shared/Hands/EntitySystems/SharedHandsSystem.Drop.cs

index 2e3c6f620344b0cf61b55b6136e0aeed97986323..0579e997253430e0b08c5ffdb9fe7f2bfc2b2254 100644 (file)
@@ -3,6 +3,7 @@ using Content.Shared.Hands.Components;
 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 abstract partial class SharedHandsSystem
         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);