mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 13:07:06 +01:00
Minimal diffs.
This commit is contained in:
parent
afb08bb0c5
commit
962f05821b
1 changed files with 1 additions and 4 deletions
|
@ -280,10 +280,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
||||||
|
|
||||||
// CraftBukkit start - make the movement speed check behave properly under tick degradation.
|
// CraftBukkit start - make the movement speed check behave properly under tick degradation.
|
||||||
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
|
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
|
||||||
if (elapsedTicks < 0) { // We should account for time drifting backwards
|
if (d8 > 100.0D * (elapsedTicks <= 0 ? 1 : elapsedTicks)) {
|
||||||
elapsedTicks = 1;
|
|
||||||
}
|
|
||||||
if (d8 > 100.0D * (elapsedTicks == 0 ? 1 : elapsedTicks)) {
|
|
||||||
a.warning(this.player.name + " moved too quickly! Elapsed ticks: " + (elapsedTicks == 0 ? 1 : elapsedTicks) + ", Distance change: " + d8);
|
a.warning(this.player.name + " moved too quickly! Elapsed ticks: " + (elapsedTicks == 0 ? 1 : elapsedTicks) + ", Distance change: " + d8);
|
||||||
this.disconnect("You moved too quickly :( (Hacking?)");
|
this.disconnect("You moved too quickly :( (Hacking?)");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue