Merge remote-tracking branch 'barotrauma/master' into lighting-optimization

This commit is contained in:
juanjp600
2017-03-01 15:02:23 -03:00
16 changed files with 151 additions and 68 deletions
+12 -1
View File
@@ -598,7 +598,18 @@ namespace Barotrauma
if (contained.body != null)
{
contained.body.FarseerBody.SetTransformIgnoreContacts(ref simPos, 0.0f);
try
{
contained.body.FarseerBody.SetTransformIgnoreContacts(ref simPos, 0.0f);
}
catch (NullReferenceException e)
{
#if DEBUG
DebugConsole.ThrowError("SetTransformIgnoreContacts threw an exception in SetContainedItemPositions", e);
#endif
contained.body.SetTransform(simPos, 0.0f);
}
}
contained.Rect =