From 1b72ef88279ebe9ac6a3913499cdef040c7ef141 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Tue, 20 Aug 2013 11:31:37 +0200 Subject: [PATCH] Better Player:close() cleanup --- src/Player.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Player.php b/src/Player.php index ef3226cc4..df2704e40 100644 --- a/src/Player.php +++ b/src/Player.php @@ -274,12 +274,21 @@ class Player{ $this->recoveryQueue = array(); $this->receiveQueue = array(); $this->resendQueue = array(); + $this->ackQueue = array(); $this->server->interface->stopChunked($this->CID); $this->server->api->player->remove($this->CID); if($msg === true and $this->username != ""){ $this->server->api->chat->broadcast($this->username." left the game"); } console("[INFO] \x1b[33m".$this->username."\x1b[0m[/".$this->ip.":".$this->port."] logged out due to ".$reason); + $this->windows = array(); + $this->armor = array(); + $this->inventory = array(); + $this->chunksLoaded = array(); + $this->chunksOrder = array(); + $this->chunkCount = array(); + $this->cratingItems = array(); + $this->received = array(); } }