mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
Micro optimization (#252)
This commit is contained in:
parent
3daa2723bf
commit
39c3b16e49
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user