- character colliders stay enabled when the character is unconscious/stunned (prevents getting stuck inside walls when the collider is re-enabled)

- can't climb over obstacles if the contact point is above the center of the character collider
- higher "obstacle climbing velocity"
- limiting collider velocity when dragging another character
This commit is contained in:
Regalis
2016-11-06 18:56:03 +02:00
parent 92985f3ed9
commit de3966ae95
3 changed files with 38 additions and 12 deletions
@@ -51,10 +51,20 @@ namespace Barotrauma
if (character.IsDead || character.IsUnconscious || stunTimer > 0.0f)
{
collider.PhysEnabled = false;
collider.SetTransform(MainLimb.SimPosition, 0.0f);
collider.FarseerBody.FixedRotation = false;
if (stunTimer > 0.0f)
if (character.IsRemotePlayer)
{
MainLimb.pullJoint.WorldAnchorB = collider.SimPosition;
MainLimb.pullJoint.Enabled = true;
}
else
{
collider.LinearVelocity = (GetLimb(LimbType.Torso).SimPosition - collider.SimPosition) * 60.0f;
collider.SmoothRotate(GetLimb(LimbType.Torso).Rotation);
}
if (stunTimer > 0)
{
stunTimer -= deltaTime;
}