Ragdoll.SetPosition takes platforms into account if the character isn't ignoring platforms (i.e. forcing a character on top of a platform won't make it fall through it), reaching the top/bottom of a ladder won't make networkplayers fall off, server ignores position updates from dead/unconscious characters, smaller ResetRagdollDistance
This commit is contained in:
@@ -793,7 +793,10 @@ namespace Barotrauma
|
||||
|
||||
if (original != simPosition)
|
||||
{
|
||||
Body body = Submarine.CheckVisibility(original, simPosition);
|
||||
Category collisionCategory = Physics.CollisionWall | Physics.CollisionLevel;
|
||||
if (!ignorePlatforms) collisionCategory |= Physics.CollisionPlatform;
|
||||
|
||||
Body body = Submarine.PickBody(original, simPosition, null, collisionCategory);
|
||||
|
||||
//if there's something in between the limbs
|
||||
if (body != null)
|
||||
@@ -803,13 +806,10 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (lerp)
|
||||
{
|
||||
limb.body.TargetPosition = movePos;
|
||||
limb.body.MoveToTargetPosition(Vector2.Distance(limb.SimPosition, movePos) < 10.0f);
|
||||
|
||||
limb.body.MoveToTargetPosition(Vector2.Distance(limb.SimPosition, movePos) < 10.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user