Moved collider position correction logic to the physicsbody class (so that it can be used for sub & item syncing), character position msg length is written in bytes instead of bits, misc cleanup/refactoring

This commit is contained in:
Regalis
2016-10-19 19:10:15 +03:00
parent b4389277aa
commit e2d0e7fe24
6 changed files with 98 additions and 105 deletions

View File

@@ -1083,17 +1083,6 @@ namespace Barotrauma
hand.body.SmoothRotate((ang2 + handAngle * Dir), 100.0f * force);
}
public override Vector2 EstimateCurrPosition(Vector2 prevPosition, float timePassed)
{
timePassed = MathHelper.Clamp(timePassed, 0.0f, 1.0f);
Vector2 targetMovement = character.GetTargetMovement();
Vector2 currPosition = prevPosition + targetMovement * timePassed / 500.0f;
return currPosition;
}
public override void Flip()
{
base.Flip();