Use Player->forceMovement on MovePlayerPacket non-tick revert

This commit is contained in:
Shoghi Cervantes 2014-10-29 00:31:17 +01:00
parent f772391866
commit 7eed92e8fb

View File

@ -1483,12 +1483,12 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
if($this->forceMovement instanceof Vector3 and ($revert or $newPos->distance($this->forceMovement) > 0.2)){
$pk = MovePlayerPacket::getFromPool();
$pk->eid = 0;
$pk->x = $this->x;
$pk->y = $this->y + $this->getEyeHeight() + 0.01;
$pk->z = $this->z;
$pk->bodyYaw = $this->yaw;
$pk->pitch = $this->pitch;
$pk->yaw = $this->yaw;
$pk->x = $this->forceMovement->x;
$pk->y = $this->forceMovement->y + $this->getEyeHeight() + 0.01;
$pk->z = $this->forceMovement->z;
$pk->bodyYaw = $packet->bodyYaw;
$pk->pitch = $packet->pitch;
$pk->yaw = $packet->yaw;
$pk->teleport = true;
$this->directDataPacket($pk);
}else{