mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
Fixed 0x60 packets being received
This commit is contained in:
parent
69b78a9dd6
commit
10d34a7ce6
@ -213,7 +213,7 @@ class Player{
|
|||||||
if($msg === true and $this->username != ""){
|
if($msg === true and $this->username != ""){
|
||||||
$this->server->api->chat->broadcast($this->username." left the game");
|
$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);
|
$this->server->api->player->remove($this->CID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -224,17 +224,17 @@ class Packet{
|
|||||||
if($reliability === 2
|
if($reliability === 2
|
||||||
or $reliability === 3
|
or $reliability === 3
|
||||||
or $reliability === 4){
|
or $reliability === 4){
|
||||||
$messageNumber = Utils::readTriad(strrev(substr($raw, $offset, 3)));
|
$messageIndex = Utils::readTriad(strrev(substr($raw, $offset, 3)));
|
||||||
$offset += 3;
|
$offset += 3;
|
||||||
}else{
|
}else{
|
||||||
$messageNumber = 0;
|
$messageIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($reliability === 1
|
if($reliability === 1
|
||||||
or $reliability === 3
|
or $reliability === 3
|
||||||
or $reliability === 4){
|
or $reliability === 4){
|
||||||
$orderIndex = Utils::readInt(substr($raw, $offset, 4));
|
$orderIndex = Utils::readTriad(strrev(substr($raw, $offset, 3)));
|
||||||
$offset += 4;
|
$offset += 3;
|
||||||
$orderChannel = ord($raw{$offset}); //5 bits, 32 values
|
$orderChannel = ord($raw{$offset}); //5 bits, 32 values
|
||||||
++$offset;
|
++$offset;
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user