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.
This commit is contained in:
Acruid
2019-09-01 15:54:30 -07:00
parent f3b460c8b4
commit 9ffbb51fd1

View File

@@ -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)