mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Fixed CPU leak
This commit is contained in:
@ -69,7 +69,7 @@ class Snowball extends Projectile{
|
||||
}
|
||||
|
||||
public function spawnTo(Player $player){
|
||||
$pk = AddEntityPacket::getFromPool();
|
||||
$pk = new AddEntityPacket();
|
||||
$pk->type = Snowball::NETWORK_ID;
|
||||
$pk->eid = $this->getID();
|
||||
$pk->x = $this->x;
|
||||
@ -78,7 +78,7 @@ class Snowball extends Projectile{
|
||||
$pk->did = 0; //TODO: send motion here
|
||||
$player->dataPacket($pk);
|
||||
|
||||
$pk = SetEntityMotionPacket::getFromPool();
|
||||
$pk = new SetEntityMotionPacket();
|
||||
$pk->entities = [
|
||||
[$this->getID(), $this->motionX, $this->motionY, $this->motionZ]
|
||||
];
|
||||
|
Reference in New Issue
Block a user