Fixed 0x60 packets being received

This commit is contained in:
Shoghi Cervantes Pueyo 2013-04-14 16:58:54 +02:00
parent 69b78a9dd6
commit 10d34a7ce6
2 changed files with 5 additions and 5 deletions

View File

@ -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);
}
}

View File

@ -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{