Potentially fix player desync issue
It was discovered that LastNetPosition is being checked to see if it's
zero in Bouncer. Then, Bouncer rejects the update. The default is zero
and potentially this can be zero in other ways. The original code in
master (checked at 9f4892f in GetDataHandlers) had an additional write
on LastNetPosition to update it, but this write was not moved over to
Bouncer. Thus, there is a high probability that players are "desync'd"
after LastNetPosition gets stuck at zero and never updates.
This commit is contained in:
parent
1ae88c9339
commit
3b748f1156
1 changed files with 4 additions and 3 deletions
|
|
@ -122,9 +122,9 @@ namespace TShockAPI
|
|||
|
||||
if (args.Player.LastNetPosition == Vector2.Zero)
|
||||
{
|
||||
TShock.Log.ConsoleDebug("Bouncer / OnPlayerUpdate rejected from (last network position) {0}", args.Player.Name);
|
||||
args.Handled = true;
|
||||
return;
|
||||
TShock.Log.ConsoleInfo("Bouncer / OnPlayerUpdate *would have rejected* from (last network position zero) {0}", args.Player.Name);
|
||||
// args.Handled = true;
|
||||
// return;
|
||||
}
|
||||
|
||||
if (!pos.Equals(args.Player.LastNetPosition))
|
||||
|
|
@ -184,6 +184,7 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
|
||||
args.Player.LastNetPosition = pos;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue