Workaround for exceptions in SetTransformIgnoreContacts
http://undertowgames.com/forum/viewtopic.php?f=21&t=5915#p112558
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user