If the distance is excessively large when forcing the collider of a dead character to follow the body, the collider is teleported instead of moving it by setting the velocity. + More physics error logging

This commit is contained in:
Joonas Rikkonen
2018-08-09 14:13:08 +03:00
parent f697ec7582
commit f99bec4ed2
3 changed files with 45 additions and 11 deletions
@@ -202,7 +202,6 @@ namespace Barotrauma.Items.Components
foreach (Item contained in Inventory.Items)
{
if (contained == null) continue;
if (contained.body != null)
{
try
@@ -211,9 +210,10 @@ namespace Barotrauma.Items.Components
}
catch (Exception e)
{
#if DEBUG
DebugConsole.ThrowError("SetTransformIgnoreContacts threw an exception in SetContainedItemPositions", e);
#endif
DebugConsole.Log("SetTransformIgnoreContacts threw an exception in SetContainedItemPositions ("+e.Message+")\n"+e.StackTrace);
GameAnalyticsManager.AddErrorEventOnce("ItemContainer.SetContainedItemPositions.InvalidPosition:"+contained.Name,
GameAnalyticsSDK.Net.EGAErrorSeverity.Error,
"SetTransformIgnoreContacts threw an exception in SetContainedItemPositions (" + e.Message + ")\n" + e.StackTrace);
}
}