Networking bugfixes & optimization
This commit is contained in:
@@ -505,7 +505,7 @@ namespace Subsurface
|
||||
|
||||
private void Translate(Vector2 amount)
|
||||
{
|
||||
if (amount == Vector2.Zero) return;
|
||||
if (amount == Vector2.Zero || ! amount.IsValid()) return;
|
||||
|
||||
Level.Loaded.Move(-amount);
|
||||
}
|
||||
@@ -516,11 +516,6 @@ namespace Subsurface
|
||||
speed += force/mass;
|
||||
}
|
||||
|
||||
//public void Move(Vector2 amount)
|
||||
//{
|
||||
// speed = Vector2.Lerp(speed, amount, 0.05f);
|
||||
//}
|
||||
|
||||
VoronoiCell collidingCell;
|
||||
public bool OnCollision(Fixture f1, Fixture f2, Contact contact)
|
||||
{
|
||||
@@ -597,6 +592,8 @@ namespace Subsurface
|
||||
return;
|
||||
}
|
||||
|
||||
if (!speed.IsValid() || targetPosition.IsValid()) return;
|
||||
|
||||
//newTargetPosition = newTargetPosition + newSpeed * (float)(NetTime.Now - sendingTime);
|
||||
|
||||
targetPosition = newTargetPosition;
|
||||
|
||||
Reference in New Issue
Block a user