Ignore MovePlayerPacket if position is the same

This commit is contained in:
Dylan K. Taylor 2016-11-22 16:55:40 +00:00
parent bee342691d
commit 8d842732e0

View File

@ -1867,6 +1867,10 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$newPos = new Vector3($packet->x, $packet->y - $this->getEyeHeight(), $packet->z);
if($newPos->distanceSquared($this) < 0.01){ //player hasn't moved, just client spamming packets
break;
}
$revert = false;
if(!$this->isAlive() or $this->spawned !== true){
$revert = true;