mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 04:17:48 +00:00
Move players from eye level, not top of head
This commit is contained in:
parent
3ee61d5ebb
commit
e6edace944
@ -1306,7 +1306,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$newPos = new Vector3($packet->x, $packet->y - 1.8, $packet->z);
|
$newPos = new Vector3($packet->x, $packet->y, $packet->z);
|
||||||
/*if($this->forceMovement instanceof Vector3){
|
/*if($this->forceMovement instanceof Vector3){
|
||||||
if($this->forceMovement->distance($newPos) <= 0.7){
|
if($this->forceMovement->distance($newPos) <= 0.7){
|
||||||
$this->forceMovement = false;
|
$this->forceMovement = false;
|
||||||
@ -2281,7 +2281,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
$pk = new MovePlayerPacket;
|
$pk = new MovePlayerPacket;
|
||||||
$pk->eid = 0;
|
$pk->eid = 0;
|
||||||
$pk->x = $this->x;
|
$pk->x = $this->x;
|
||||||
$pk->y = $this->y + $this->height; //teleport from head
|
$pk->y = $this->y + 1.62; //teleport from head
|
||||||
$pk->z = $this->z;
|
$pk->z = $this->z;
|
||||||
$pk->bodyYaw = $this->yaw;
|
$pk->bodyYaw = $this->yaw;
|
||||||
$pk->pitch = $this->pitch;
|
$pk->pitch = $this->pitch;
|
||||||
|
@ -491,7 +491,7 @@ abstract class Entity extends Position implements Metadatable{
|
|||||||
$pk = new MovePlayerPacket;
|
$pk = new MovePlayerPacket;
|
||||||
$pk->eid = $this->id;
|
$pk->eid = $this->id;
|
||||||
$pk->x = $this->x;
|
$pk->x = $this->x;
|
||||||
$pk->y = $this->y + $this->height; //teleport from head
|
$pk->y = $this->y + 1.62; //teleport from head
|
||||||
$pk->z = $this->z;
|
$pk->z = $this->z;
|
||||||
$pk->yaw = $this->yaw;
|
$pk->yaw = $this->yaw;
|
||||||
$pk->pitch = $this->pitch;
|
$pk->pitch = $this->pitch;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user