mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
Ignore MovePlayerPacket if position is the same
This commit is contained in:
parent
bee342691d
commit
8d842732e0
@ -1867,6 +1867,10 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
|
|
||||||
$newPos = new Vector3($packet->x, $packet->y - $this->getEyeHeight(), $packet->z);
|
$newPos = new Vector3($packet->x, $packet->y - $this->getEyeHeight(), $packet->z);
|
||||||
|
|
||||||
|
if($newPos->distanceSquared($this) < 0.01){ //player hasn't moved, just client spamming packets
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
$revert = false;
|
$revert = false;
|
||||||
if(!$this->isAlive() or $this->spawned !== true){
|
if(!$this->isAlive() or $this->spawned !== true){
|
||||||
$revert = true;
|
$revert = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user