Fix last pos at join. Reject all movement until server can verify the last position set.
This commit is contained in:
parent
1e6c74ace0
commit
4d2639bb2a
2 changed files with 8 additions and 0 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue