New wire sprite and switched the body from circle to capsule, tweaked physicsbody position lerping logic (catches up with the server faster)

This commit is contained in:
Regalis
2017-02-22 22:02:33 +02:00
parent d7aba531d7
commit 27e74490a0
6 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -500,7 +500,7 @@ namespace Barotrauma
{
//if there are more than 2 positions in the buffer,
//increase the interpolation speed to catch up with the server
float speedMultiplier = 0.9f + (float)Math.Pow((positionBuffer.Count - 2) / 5.0f, 2.0f);
float speedMultiplier = (float)Math.Pow(1.0f + (positionBuffer.Count - 2) / 10.0f, 2.0f);
netInterpolationState += (deltaTime * speedMultiplier) / (next.Timestamp - prev.Timestamp);
newPosition = Vector2.Lerp(prev.Position, next.Position, netInterpolationState);