mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-11 04:17:48 +00:00
Handle unknown packets more gracefully
This commit is contained in:
parent
0ff647015c
commit
dfd5733969
@ -1141,6 +1141,7 @@ class Player{
|
||||
foreach($this->receiveQueue as $count => $packets){
|
||||
unset($this->receiveQueue[$count]);
|
||||
foreach($packets as $p){
|
||||
if($p instanceof RakNetDataPacket){
|
||||
if(isset($p->messageIndex) and $p->messageIndex !== false){
|
||||
if($p->messageIndex > $this->receiveCount){
|
||||
$this->receiveCount = $p->messageIndex;
|
||||
@ -1166,6 +1167,7 @@ class Player{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($this->nextBuffer <= $time and $this->bufferLen > 0){
|
||||
$this->sendBuffer();
|
||||
@ -2235,7 +2237,7 @@ class Player{
|
||||
}
|
||||
break;
|
||||
default:
|
||||
console("[DEBUG] Unhandled 0x".dechex($packet->pid())." data packet for ".$this->username." (".$this->clientID."): ".print_r($data, true), true, true, 2);
|
||||
console("[DEBUG] Unhandled 0x".dechex($packet->pid())." data packet for ".$this->username." (".$this->clientID."): ".print_r($packet, true), true, true, 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user