Reliablesender exception handling, buttons crashing multiplayer, using screwdrivers/wrenches with left click, RestoreCollision exception handling, nerfed c4, UpdateLimbCollisionCategories fix

This commit is contained in:
Regalis
2015-10-23 00:10:27 +03:00
parent 51e68f0949
commit b3462b24b4
34 changed files with 256 additions and 113 deletions
@@ -119,11 +119,31 @@ namespace Barotrauma.Items.Components
{
if (stickTarget!=null)
{
item.body.FarseerBody.RestoreCollisionWith(stickTarget);
try
{
item.body.FarseerBody.RestoreCollisionWith(stickTarget);
}
catch (Exception e)
{
#if DEBUG
DebugConsole.ThrowError("Failed to restore collision with stickTarget", e);
#endif
}
stickTarget = null;
}
GameMain.World.RemoveJoint(stickJoint);
try
{
GameMain.World.RemoveJoint(stickJoint);
}
catch (Exception e)
{
#if DEBUG
DebugConsole.ThrowError("Failed to remove stickJoint", e);
#endif
}
stickJoint = null;
IsActive = false;