From 232e4951b07d345bc6320b9ee9243f8d314a21c4 Mon Sep 17 00:00:00 2001 From: Acruid Date: Wed, 24 Jul 2019 10:59:19 -0700 Subject: [PATCH] Fixes InteractionSystem so that a player can pick up an item from a grid that isn't at the world origin. --- .../GameObjects/EntitySystems/Click/InteractionSystem.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs index 8f7283d349..3f851589dc 100644 --- a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs @@ -15,6 +15,7 @@ using Robust.Shared.Interfaces.Map; using Robust.Shared.IoC; using Robust.Shared.Log; using Robust.Shared.Map; +using Robust.Shared.Maths; using Robust.Shared.Players; namespace Content.Server.GameObjects.EntitySystems @@ -330,7 +331,7 @@ namespace Content.Server.GameObjects.EntitySystems // Check if ClickLocation is in object bounds here, if not lets log as warning and see why if (attacked.TryGetComponent(out BoundingBoxComponent boundingBox)) { - if (!boundingBox.WorldAABB.Contains(coordinates.Position)) + if (!boundingBox.WorldAABB.Contains(coordinates.ToWorld(_mapManager).Position)) { Logger.WarningS("system.interaction", $"Player {player.Name} clicked {attacked.Name} outside of its bounding box component somehow");