Fixed CPU leak

This commit is contained in:
Shoghi Cervantes
2014-10-31 21:05:37 +01:00
parent ae06681b60
commit 8601405a88
73 changed files with 304 additions and 564 deletions

View File

@ -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]
];