Reset relative of entities to 0 on pickup.

This mostly helps with akwardness related to sound positioning.
This commit is contained in:
Pieter-Jan Briers
2019-03-22 22:18:17 +01:00
parent c27be2bf95
commit 5b0f49bab7

View File

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