From 10d34a7ce6dc6c58423ce9c15d2e539141db85d8 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sun, 14 Apr 2013 16:58:54 +0200 Subject: [PATCH] Fixed 0x60 packets being received --- src/Player.php | 2 +- src/network/Packet.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Player.php b/src/Player.php index a8f372e38..104ce2ec6 100644 --- a/src/Player.php +++ b/src/Player.php @@ -213,7 +213,7 @@ class Player{ if($msg === true and $this->username != ""){ $this->server->api->chat->broadcast($this->username." left the game"); } - console("[INFO] Session with \x1b[36m".$this->ip.":".$this->port."\x1b[0m Client ID ".$this->clientID." closed due to ".$reason); + console("[INFO] \x1b[33m".$this->username."\x1b[0m[/".$this->ip.":".$this->port."] disconnected due to ".$reason); $this->server->api->player->remove($this->CID); } } diff --git a/src/network/Packet.php b/src/network/Packet.php index 61b17b173..9e2d2e087 100644 --- a/src/network/Packet.php +++ b/src/network/Packet.php @@ -224,17 +224,17 @@ class Packet{ if($reliability === 2 or $reliability === 3 or $reliability === 4){ - $messageNumber = Utils::readTriad(strrev(substr($raw, $offset, 3))); + $messageIndex = Utils::readTriad(strrev(substr($raw, $offset, 3))); $offset += 3; }else{ - $messageNumber = 0; + $messageIndex = 0; } if($reliability === 1 or $reliability === 3 or $reliability === 4){ - $orderIndex = Utils::readInt(substr($raw, $offset, 4)); - $offset += 4; + $orderIndex = Utils::readTriad(strrev(substr($raw, $offset, 3))); + $offset += 3; $orderChannel = ord($raw{$offset}); //5 bits, 32 values ++$offset; }else{