Fix last pos at join. Reject all movement until server can verify the last position set.

This commit is contained in:
Zidonuke 2011-12-29 20:31:47 -05:00
parent 1e6c74ace0
commit 4d2639bb2a
2 changed files with 8 additions and 0 deletions

View file

@ -735,6 +735,11 @@ namespace TShockAPI
return true;
}
if(args.Player.LastNetPosition == Vector2.Zero)
{
return true;
}
if (!pos.Equals(args.Player.LastNetPosition))
{
float distance = Vector2.Distance(new Vector2(pos.X / 16f, pos.Y / 16f), new Vector2(args.Player.LastNetPosition.X / 16f, args.Player.LastNetPosition.Y / 16f));