mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Fixed CPU leak
This commit is contained in:
@ -46,7 +46,7 @@ class Zombie extends Monster{
|
||||
|
||||
public function spawnTo(Player $player){
|
||||
|
||||
$pk = AddMobPacket::getFromPool();
|
||||
$pk = new AddMobPacket();
|
||||
$pk->eid = $this->getID();
|
||||
$pk->type = Zombie::NETWORK_ID;
|
||||
$pk->x = $this->x;
|
||||
@ -57,7 +57,7 @@ class Zombie extends Monster{
|
||||
$pk->metadata = $this->getData();
|
||||
$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