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:
Regalis
2016-08-10 19:16:18 +03:00
parent 70dd90f0f8
commit 69933188d6
6 changed files with 33 additions and 22 deletions

View File

@@ -814,15 +814,12 @@ namespace Barotrauma
}
else
{
notClimbing = Math.Abs(targetMovement.X) > 0.05f;
notClimbing = Math.Abs(targetMovement.X) > 0.05f ||
(TargetMovement.Y < 0.0f && ConvertUnits.ToSimUnits(trigger.Height) + handPos.Y < HeadPosition) ||
(TargetMovement.Y > 0.0f && handPos.Y > 0.1f);
}
//stop climbing if:
// - moving sideways
// - reached the top or bottom of the ladder
if (notClimbing ||
(TargetMovement.Y < 0.0f && ConvertUnits.ToSimUnits(trigger.Height) + handPos.Y < HeadPosition) ||
(TargetMovement.Y > 0.0f && handPos.Y > 0.1f))
if (notClimbing)
{
Anim = Animation.None;
character.SelectedConstruction = null;