Fixed a server-side off-by-one error in the player input IDs

I'm guessing this one comes from the player's position not being updated immediately after the input is processed, so that's where most of the remaining error came from.
Also added some rounding to the horizontal velocity when approaching 0, and changed something that depended on the head limb to use the collider instead, which should hopefully further reduce the chance of syncing errors.
This commit is contained in:
juanjp600
2017-01-05 22:37:14 -03:00
parent ba4ee843f3
commit 0569a665f4
4 changed files with 30 additions and 8 deletions

View File

@@ -489,6 +489,10 @@ namespace Barotrauma
{
movement = Vector2.Normalize(movement);
}
if (Math.Abs(movement.X)<0.005f)
{
movement.X = 0.0f;
}
}
private void ClimbOverObstacles()