mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
Player: workaround 1.14.30 movement bug
I can understand why this bug happened, but it doesn't mean I like it. Fix it pls mojang, this sucks.
This commit is contained in:
parent
a860ccd259
commit
d63d6b73f6
@ -1594,7 +1594,8 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
if($to->distanceSquared($ev->getTo()) > 0.01){ //If plugins modify the destination
|
if($to->distanceSquared($ev->getTo()) > 0.01){ //If plugins modify the destination
|
||||||
$this->teleport($ev->getTo());
|
$this->teleport($ev->getTo());
|
||||||
}else{
|
}else{
|
||||||
$this->broadcastMovement();
|
//TODO: workaround 1.14.30 bug: MoveActor(Absolute|Delta)Packet don't work on players anymore :(
|
||||||
|
$this->sendPosition($this, $this->yaw, $this->pitch, MovePlayerPacket::MODE_NORMAL, $this->hasSpawned);
|
||||||
|
|
||||||
$distance = sqrt((($from->x - $to->x) ** 2) + (($from->z - $to->z) ** 2));
|
$distance = sqrt((($from->x - $to->x) ** 2) + (($from->z - $to->z) ** 2));
|
||||||
//TODO: check swimming (adds 0.015 exhaustion in MCPE)
|
//TODO: check swimming (adds 0.015 exhaustion in MCPE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user