Check rotation changes. Fix #124, fix #128

This commit is contained in:
Dylan K. Taylor 2016-11-27 15:58:37 +00:00
parent c79077cbed
commit fa5624f87e

View File

@ -1867,9 +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
if($newPos->distanceSquared($this) < 0.01 and ($packet->yaw % 360) === $this->yaw and ($packet->pitch % 360) === $this->pitch){ //player hasn't moved, just client spamming packets
break;
}
echo "not ignoring\n";
$revert = false;
if(!$this->isAlive() or $this->spawned !== true){