From 9ffbb51fd11cba40033757607079e59f10869054 Mon Sep 17 00:00:00 2001 From: Acruid Date: Sun, 1 Sep 2019 15:54:30 -0700 Subject: [PATCH] Items are now dropped at the pointer location if the pointer is withing the interaction range. Previously the dropped item was always placed at the player entity location. Resolves https://github.com/space-wizards/space-station-14/issues/235. --- .../GameObjects/EntitySystems/HandsSystem.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/EntitySystems/HandsSystem.cs b/Content.Server/GameObjects/EntitySystems/HandsSystem.cs index 966e16f8f5..181b5a024e 100644 --- a/Content.Server/GameObjects/EntitySystems/HandsSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/HandsSystem.cs @@ -109,7 +109,15 @@ namespace Content.Server.GameObjects.EntitySystems { return; } - handsComp.Drop(handsComp.ActiveIndex); + + if (coords.InRange(_mapManager, ent.Transform.GridPosition, InteractionSystem.InteractionRange)) + { + handsComp.Drop(handsComp.ActiveIndex, coords); + } + else + { + handsComp.Drop(handsComp.ActiveIndex); + } } private static void HandleActivateItem(ICommonSession session)