From 5b0f49bab73e4a2e6ef4271c4ef41c54ee908ccf Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Fri, 22 Mar 2019 22:18:17 +0100 Subject: [PATCH] Reset relative of entities to 0 on pickup. This mostly helps with akwardness related to sound positioning. --- .../GameObjects/Components/GUI/ServerHandsComponent.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs b/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs index d0ba6b36bc..d05c6ca064 100644 --- a/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs +++ b/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs @@ -16,6 +16,7 @@ using SS14.Shared.Interfaces.Network; using SS14.Shared.IoC; using SS14.Shared.Log; using SS14.Shared.Map; +using SS14.Shared.Maths; using SS14.Shared.Serialization; using SS14.Shared.Utility; using SS14.Shared.ViewVariables; @@ -137,7 +138,13 @@ namespace Content.Server.GameObjects var slot = hands[index]; Dirty(); - return slot.Insert(item.Owner); + var success = slot.Insert(item.Owner); + if (success) + { + item.Owner.Transform.LocalPosition = Vector2.Zero; + } + + return success; } public bool CanPutInHand(ItemComponent item)