attaches item to wall where hand is, not at center of body

This commit is contained in:
ursinewalrus
2018-07-31 18:50:38 -05:00
parent 82103cf394
commit d8559ad63c

View File

@@ -160,7 +160,18 @@ namespace Barotrauma.Items.Components
if (item.body != null)
{
item.body.ResetDynamics();
item.SetTransform(picker.SimPosition, 0.0f);
Limb heldHand;
if (picker.Inventory.IsInLimbSlot(item, InvSlotType.LeftHand))
{
heldHand = picker.AnimController.GetLimb(LimbType.LeftHand);
}
else
{
heldHand = picker.AnimController.GetLimb(LimbType.RightHand);
}
item.SetTransform(heldHand.SimPosition, 0.0f);
}
picker.DeselectItem(item);