mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +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);
|
||||
|
||||
if($newPos->distanceSquared($this) < 0.01){ //player hasn't moved, just client spamming packets
|
||||
break;
|
||||
}
|
||||
|
||||
$revert = false;
|
||||
if(!$this->isAlive() or $this->spawned !== true){
|
||||
$revert = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user