Pocketmine-mp: Bad/annoying things happen when the server is lagging heavily due to client/server ticks out of sync

Created on 26 Jan 2017  路  2Comments  路  Source: pmmp/PocketMine-MP

Issue description

We've all seen it happen where you fly a distance when the server is lagging a lot, and then boom you're dragged back to point A. It's really irritating.

This is because when the server is under heavy load, ticks may _not_ accurately represent 50 milliseconds, while client-side they still do. Let's say you move from 0,60,0 to 50,60,50 while the server is frozen. Because of the overload, those position changes will not be processed until the current heavy-load issue is out of the way. But the server still thinks that took _1 tick_. Result: the server thinks you moved ~70 blocks in a single tick - nope, get your ass back here.

The long and short of it is that server main thread times and ticks cannot be trusted to provide an accurate representation of time difference, and this causes issues when handling clients who aren't lagging at all.

Steps to reproduce the issue

  1. lag your server
  2. fly a long distance
  3. get yanked back

OS and versions

Core Invalid

Most helpful comment

"nope, get your ass back here" 馃榿

All 2 comments

"nope, get your ass back here" 馃榿

Contrary to this issue's original thoughts, this is more often the result of network lag as opposed to the server lagging behind. That's an issue that can't be completely fixed, only worked around (see "blink" hacks on PC servers).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MisteFr picture MisteFr  路  3Comments

arfianadam picture arfianadam  路  3Comments

sergeysova picture sergeysova  路  3Comments

Muqsit picture Muqsit  路  3Comments

Muqsit picture Muqsit  路  3Comments