Accuracy again -_-

This commit is contained in:
Dylan K. Taylor 2017-02-20 19:45:35 +00:00
parent 68998bac48
commit 408f63f8fa

View File

@ -1922,7 +1922,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
case ProtocolInfo::MOVE_PLAYER_PACKET:
$newPos = new Vector3($packet->x, $packet->y - $this->getEyeHeight(), $packet->z);
if($newPos->distanceSquared($this) < 0.0001 and ($packet->yaw % 360) === $this->yaw and ($packet->pitch % 360) === $this->pitch){ //player hasn't moved, just client spamming packets
if($newPos->distanceSquared($this) == 0 and ($packet->yaw % 360) === $this->yaw and ($packet->pitch % 360) === $this->pitch){ //player hasn't moved, just client spamming packets
break;
}