Re-enabled anchoring main limb to the collider when a remote player is unconscious (otherwise only the position of the collider will be synced, and the ragdoll won't follow it)

+ stunned characters can't send position updates
This commit is contained in:
Regalis
2017-02-25 16:47:20 +02:00
parent bf3fa804df
commit c9f09031de
2 changed files with 7 additions and 7 deletions
@@ -64,16 +64,16 @@ namespace Barotrauma
levitatingCollider = false;
Collider.FarseerBody.FixedRotation = false;
/*if (character.IsRemotePlayer)
if (character.IsRemotePlayer)
{
MainLimb.pullJoint.WorldAnchorB = Collider.SimPosition;
MainLimb.pullJoint.Enabled = true;
}
else
{*/
Collider.LinearVelocity = (GetLimb(LimbType.Waist).SimPosition - Collider.SimPosition) * 20.0f;
Collider.SmoothRotate(GetLimb(LimbType.Torso).Rotation);
//}
{
Collider.LinearVelocity = (GetLimb(LimbType.Waist).SimPosition - Collider.SimPosition) * 20.0f;
Collider.SmoothRotate(GetLimb(LimbType.Torso).Rotation);
}
if (stunTimer > 0)
{