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:
@@ -146,6 +146,11 @@ namespace Barotrauma
|
||||
get { return body.Position; }
|
||||
}
|
||||
|
||||
public Vector2 Position
|
||||
{
|
||||
get { return ConvertUnits.ToDisplayUnits(body.Position); }
|
||||
}
|
||||
|
||||
public Vector2 PrevPosition
|
||||
{
|
||||
get { return prevPosition; }
|
||||
|
||||
Reference in New Issue
Block a user