- 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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user