Improved network packets allocation

This commit is contained in:
Shoghi Cervantes
2014-10-27 20:30:33 +01:00
parent 3f5b129cf5
commit db82f76c11
69 changed files with 366 additions and 222 deletions

View File

@ -271,7 +271,7 @@ abstract class Door extends Transparent{
if($player instanceof Player){
unset($players[$player->getID()]);
}
$pk = new LevelEventPacket;
$pk = LevelEventPacket::getFromPool();
$pk->x = $this->x;
$pk->y = $this->y;
$pk->z = $this->z;
@ -290,7 +290,7 @@ abstract class Door extends Transparent{
if($player instanceof Player){
unset($players[$player->getID()]);
}
$pk = new LevelEventPacket;
$pk = LevelEventPacket::getFromPool();
$pk->x = $this->x;
$pk->y = $this->y;
$pk->z = $this->z;