Fix "moved too quickly" detection.
Dieser Commit ist enthalten in:
Ursprung
e1a4273957
Commit
164c066453
@ -950,14 +950,6 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
|
||||
public void a(boolean flag, boolean flag1, boolean flag2) {
|
||||
if (this.fauxSleeping && !this.sleeping) return; // CraftBukkit - Can't leave bed if not in one!
|
||||
|
||||
// CraftBukkit start - moved check from packet19 handler TODO: make sure this works before turning on
|
||||
// if (this instanceof EntityPlayer) {
|
||||
// ((EntityPlayer) this).netServerHandler.checkMovement = false;
|
||||
// }
|
||||
// CraftBukkit end
|
||||
|
||||
this.a(0.6F, 1.8F);
|
||||
this.d_();
|
||||
ChunkCoordinates chunkcoordinates = this.bT;
|
||||
|
@ -431,6 +431,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
|
||||
public void a(boolean flag, boolean flag1, boolean flag2) {
|
||||
if (this.fauxSleeping && !this.sleeping) return; // CraftBukkit - Can't leave bed if not in one!
|
||||
|
||||
if (this.isSleeping()) {
|
||||
this.q().getTracker().sendPacketToEntity(this, new Packet18ArmAnimation(this, 3));
|
||||
}
|
||||
|
@ -353,17 +353,16 @@ public class NetServerHandler extends NetHandler {
|
||||
d4 = d1 - this.player.locX;
|
||||
double d6 = d2 - this.player.locY;
|
||||
double d7 = d3 - this.player.locZ;
|
||||
double d8 = Math.min(Math.abs(d4), Math.abs(this.player.motX));
|
||||
double d9 = Math.min(Math.abs(d6), Math.abs(this.player.motY));
|
||||
double d10 = Math.min(Math.abs(d7), Math.abs(this.player.motZ));
|
||||
// CraftBukkit start - min to max
|
||||
double d8 = Math.max(Math.abs(d4), Math.abs(this.player.motX));
|
||||
double d9 = Math.max(Math.abs(d6), Math.abs(this.player.motY));
|
||||
double d10 = Math.max(Math.abs(d7), Math.abs(this.player.motZ));
|
||||
// CraftBukkit end
|
||||
double d11 = d8 * d8 + d9 * d9 + d10 * d10;
|
||||
|
||||
if (d11 > 100.0D && this.checkMovement && (!this.minecraftServer.H() || !this.minecraftServer.G().equals(this.player.name))) { // CraftBukkit - Added this.checkMovement condition to solve this check being triggered by teleports
|
||||
logger.warning(this.player.name + " moved too quickly! " + d4 + "," + d6 + "," + d7 + " (" + d8 + ", " + d9 + ", " + d10 + ")");
|
||||
// CraftBukkit start - temporarily switch back to kicking
|
||||
// this.a(this.y, this.z, this.q, this.player.yaw, this.player.pitch);
|
||||
this.disconnect("You moved too quickly :( (Hacking?)");
|
||||
// CraftBukkit end
|
||||
this.a(this.y, this.z, this.q, this.player.yaw, this.player.pitch);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -965,7 +964,7 @@ public class NetServerHandler extends NetHandler {
|
||||
this.player.setSprinting(false);
|
||||
} else if (packet19entityaction.animation == 3) {
|
||||
this.player.a(false, true, true);
|
||||
this.checkMovement = false;
|
||||
// this.checkMovement = false; // CraftBukkit - this is handled in teleport
|
||||
}
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren