Micro optimization (#252)

This commit is contained in:
xFlare 2017-01-12 10:38:30 -05:00 committed by Dylan K. Taylor
parent 3daa2723bf
commit 39c3b16e49

View File

@ -1908,7 +1908,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$this->forceMovement = new Vector3($this->x, $this->y, $this->z);
}
if($this->forceMovement instanceof Vector3 and (($dist = $newPos->distanceSquared($this->forceMovement)) > 0.1 or $revert)){
if($this->forceMovement instanceof Vector3 and ($newPos->distanceSquared($this->forceMovement) > 0.1 or $revert)){
$this->sendPosition($this->forceMovement, $packet->yaw, $packet->pitch);
}else{
$packet->yaw %= 360;