mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 07:39:57 +00:00
Update Player.php
This commit is contained in:
parent
04fc062b2a
commit
ea8ba995ac
@ -1856,7 +1856,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($this->teleportPosition !== null or ($this->forceMovement instanceof Vector3 and (($dist = $newPos->distanceSquared($this->forceMovement)) > 0.1 or $revert))){
|
if($this->teleportPosition !== null or ($this->forceMovement instanceof Vector3 and (($dist = $newPos->distanceSquared($this->forceMovement)) > 0.1 or $revert))){
|
||||||
$this->sendPosition($this->forceMovement, $packet->yaw, $packet->pitch);
|
$this->sendPosition($this->teleportPosition === null ? $this->forceMovement : $this->teleportPosition, $packet->yaw, $packet->pitch);
|
||||||
}else{
|
}else{
|
||||||
$packet->yaw %= 360;
|
$packet->yaw %= 360;
|
||||||
$packet->pitch %= 360;
|
$packet->pitch %= 360;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user