diff --git a/Barotrauma/BarotraumaClient/Source/Physics/PhysicsBody.cs b/Barotrauma/BarotraumaClient/Source/Physics/PhysicsBody.cs
index d1761d676..fab035355 100644
--- a/Barotrauma/BarotraumaClient/Source/Physics/PhysicsBody.cs
+++ b/Barotrauma/BarotraumaClient/Source/Physics/PhysicsBody.cs
@@ -27,7 +27,14 @@ namespace Barotrauma
if (GameMain.DebugDraw)
{
- if (!body.Awake) color = Color.Blue;
+ if (!body.Enabled)
+ {
+ color = Color.Gray;
+ }
+ else if (!body.Awake)
+ {
+ color = Color.Blue;
+ }
if (targetPosition != null)
{
diff --git a/Barotrauma/BarotraumaShared/Content/Characters/Human/human.xml b/Barotrauma/BarotraumaShared/Content/Characters/Human/human.xml
index 4afd2b268..12a106e08 100644
--- a/Barotrauma/BarotraumaShared/Content/Characters/Human/human.xml
+++ b/Barotrauma/BarotraumaShared/Content/Characters/Human/human.xml
@@ -85,7 +85,7 @@
-
+
diff --git a/Barotrauma/BarotraumaShared/Content/Characters/Human/humanhusk.xml b/Barotrauma/BarotraumaShared/Content/Characters/Human/humanhusk.xml
index 29b52fdce..87c56f3e5 100644
--- a/Barotrauma/BarotraumaShared/Content/Characters/Human/humanhusk.xml
+++ b/Barotrauma/BarotraumaShared/Content/Characters/Human/humanhusk.xml
@@ -93,7 +93,7 @@
-
+
diff --git a/Barotrauma/BarotraumaShared/Content/Characters/Husk/husk.xml b/Barotrauma/BarotraumaShared/Content/Characters/Husk/husk.xml
index 179d8dbbe..dddd5d3a7 100644
--- a/Barotrauma/BarotraumaShared/Content/Characters/Husk/husk.xml
+++ b/Barotrauma/BarotraumaShared/Content/Characters/Husk/husk.xml
@@ -94,9 +94,9 @@
-
+
-
+
diff --git a/Barotrauma/BarotraumaShared/Source/Characters/AI/EnemyAIController.cs b/Barotrauma/BarotraumaShared/Source/Characters/AI/EnemyAIController.cs
index 2647088a1..e4f881357 100644
--- a/Barotrauma/BarotraumaShared/Source/Characters/AI/EnemyAIController.cs
+++ b/Barotrauma/BarotraumaShared/Source/Characters/AI/EnemyAIController.cs
@@ -556,7 +556,7 @@ namespace Barotrauma
targetCharacter.AnimController.MainLimb.AddDamage(targetCharacter.SimPosition, DamageType.None, Rand.Range(10.0f, 25.0f), 10.0f, false);
//keep severing joints until there is only one limb left
- LimbJoint[] nonSeveredJoints = Array.FindAll(targetCharacter.AnimController.LimbJoints, l => !l.IsSevered);
+ LimbJoint[] nonSeveredJoints = Array.FindAll(targetCharacter.AnimController.LimbJoints, l => !l.IsSevered && l.CanBeSevered);
if (nonSeveredJoints.Length == 0)
{
//only one limb left, the character is now full eaten
diff --git a/Barotrauma/BarotraumaShared/Source/Characters/Animation/Ragdoll.cs b/Barotrauma/BarotraumaShared/Source/Characters/Animation/Ragdoll.cs
index 53add316d..506b7a9e7 100644
--- a/Barotrauma/BarotraumaShared/Source/Characters/Animation/Ragdoll.cs
+++ b/Barotrauma/BarotraumaShared/Source/Characters/Animation/Ragdoll.cs
@@ -1,4 +1,5 @@
-using FarseerPhysics;
+using Barotrauma.Networking;
+using FarseerPhysics;
using FarseerPhysics.Dynamics;
using FarseerPhysics.Dynamics.Contacts;
using FarseerPhysics.Dynamics.Joints;
@@ -388,7 +389,7 @@ namespace Barotrauma
limb2Pos = ConvertUnits.ToSimUnits(limb2Pos);
LimbJoint joint = new LimbJoint(Limbs[limb1ID], Limbs[limb2ID], limb1Pos, limb2Pos);
- joint.CanBeSevered = ToolBox.GetAttributeBool(subElement, "canbesevered", false);
+ joint.CanBeSevered = ToolBox.GetAttributeBool(subElement, "canbesevered", true);
if (subElement.Attribute("lowerlimit") != null)
{
@@ -522,6 +523,11 @@ namespace Barotrauma
public void SeverLimbJoint(LimbJoint limbJoint)
{
+ if (!limbJoint.CanBeSevered)
+ {
+ return;
+ }
+
limbJoint.IsSevered = true;
limbJoint.Enabled = false;
@@ -536,6 +542,11 @@ namespace Barotrauma
limb.IsSevered = true;
}
}
+
+ if (GameMain.Server != null)
+ {
+ GameMain.Server.CreateEntityEvent(character, new object[] { NetEntityEvent.Type.Status });
+ }
}
private void GetConnectedLimbs(List connectedLimbs, List checkedJoints, Limb limb)