Example #1
0
 public void DestroyJoint(InternalBaseJoint joint)
 {
     Joints.Remove(joint);
     joint.One.Joints.Remove(joint);
     joint.Two.Joints.Remove(joint);
     joint.Disable();
     if (joint is BaseJoint)
     {
         BaseJoint pjoint = (BaseJoint)joint;
         if (pjoint.CurrentJoint != null)
         {
             try
             {
                 PhysicsWorld.Remove(pjoint.CurrentJoint);
             }
             catch (Exception ex)
             {
                 // We don't really care...
                 Utilities.CheckException(ex);
             }
         }
     }
     SendToAll(new DestroyJointPacketOut(joint));
 }