Marked chat packets as not recoverable

This commit is contained in:
Shoghi Cervantes 2013-06-08 17:05:39 +02:00
parent 1a822460d8
commit 9874bd199e

View File

@ -565,9 +565,9 @@ class Player{
}
}
}
$this->dataPacket(MC_CHAT, array(
$this->directdataPacket(MC_CHAT, array(
"message" => $m,
));
), 0x00, false);
}
}
@ -1708,7 +1708,7 @@ class Player{
}
}
public function directDataPacket($id, $data = array(), $pid = 0x00){
public function directDataPacket($id, $data = array(), $pid = 0x00, $recover = true){
if($this->connected === false){
return false;
}
@ -1716,6 +1716,7 @@ class Player{
$data["pid"] = $pid;
$data["sendtime"] = microtime(true);
$count = $this->counter[0]++;
if($recover !== false){
if(count($this->recovery) >= PLAYER_RECOVERY_BUFFER){
reset($this->recovery);
$k = key($this->recovery);
@ -1724,6 +1725,8 @@ class Player{
end($this->recovery);
}
$this->recovery[$count] = $data;
}
$this->send(0x80, array(
$count,