- Fixed creatures being able to sever non-severable limb joints (which caused syncing issues when the waist->torso joint of a humanoid was severed).

- The server creates an entity event when a joint is severed.
- Made joints severable by default.
This commit is contained in:
Joonas Rikkonen
2017-09-21 17:50:24 +03:00
parent dd86b5745a
commit 8c3c689596
6 changed files with 26 additions and 8 deletions
@@ -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