mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
InGamePacketHandler: fix regression in movement handling since 82c8fa696a2e8609d8ae086c52f96abe7c7705b6
fixes #4291 fixes #4398
This commit is contained in:
parent
4111d92b98
commit
7701e1ff98
@ -177,7 +177,7 @@ class InGamePacketHandler extends PacketHandler{
|
||||
$this->player->setRotation($yaw, $pitch);
|
||||
|
||||
$curPos = $this->player->getLocation();
|
||||
$newPos = $packet->position->subtract(0, 1.62, 0);
|
||||
$newPos = $packet->position->round(4)->subtract(0, 1.62, 0);
|
||||
|
||||
if($this->forceMoveSync and $newPos->distanceSquared($curPos) > 1){ //Tolerate up to 1 block to avoid problems with client-sided physics when spawning in blocks
|
||||
$this->session->getLogger()->debug("Got outdated pre-teleport movement, received " . $newPos . ", expected " . $curPos);
|
||||
|
Loading…
x
Reference in New Issue
Block a user