Impulses aren't applied to disabled item bodies when the submarine hits something, velocities of item bodies are reset when the item is dropped, pathfinding errors don't open the debug console
This commit is contained in:
@@ -203,9 +203,11 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
if (picker == null || picker.Inventory == null)
|
||||
{
|
||||
if (item.ParentInventory!=null && item.ParentInventory.Owner!=null)
|
||||
if (item.ParentInventory != null && item.ParentInventory.Owner != null)
|
||||
{
|
||||
bodyDropPos = item.ParentInventory.Owner.SimPosition;
|
||||
|
||||
if (item.body != null) item.body.ResetDynamics();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -217,6 +219,12 @@ namespace Barotrauma.Items.Components
|
||||
Limb rightHand = picker.AnimController.GetLimb(LimbType.RightHand);
|
||||
bodyDropPos = rightHand.SimPosition;
|
||||
|
||||
if (item.body!=null)
|
||||
{
|
||||
item.body.LinearVelocity = rightHand.body.LinearVelocity;
|
||||
item.body.AngularVelocity = rightHand.body.AngularVelocity;
|
||||
}
|
||||
|
||||
picker.Inventory.RemoveItem(item);
|
||||
picker = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user