mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-28 06:09:57 +00:00
Fixed #347
This commit is contained in:
parent
3e46fc1fdd
commit
04390e758d
@ -831,9 +831,9 @@ class Player{
|
|||||||
case 0xa0: //NACK
|
case 0xa0: //NACK
|
||||||
foreach($data[0] as $count){
|
foreach($data[0] as $count){
|
||||||
if(isset($this->recovery[$count])){
|
if(isset($this->recovery[$count])){
|
||||||
|
$this->lag[] = microtime(true) - $this->recovery[$count]["sendtime"];
|
||||||
$this->directDataPacket($this->recovery[$count]["id"], $this->recovery[$count], $this->recovery[$count]["pid"]);
|
$this->directDataPacket($this->recovery[$count]["id"], $this->recovery[$count], $this->recovery[$count]["pid"]);
|
||||||
++$this->packetStats[1];
|
++$this->packetStats[1];
|
||||||
$this->lag[] = microtime(true) - $this->recovery[$count]["sendtime"];
|
|
||||||
unset($this->recovery[$count]);
|
unset($this->recovery[$count]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -852,9 +852,9 @@ class Player{
|
|||||||
foreach($this->recovery as $count => $d){
|
foreach($this->recovery as $count => $d){
|
||||||
$diff = $this->counter[2] - $count;
|
$diff = $this->counter[2] - $count;
|
||||||
if($diff > 16 and $d["sendtime"] < $limit){
|
if($diff > 16 and $d["sendtime"] < $limit){
|
||||||
|
$this->lag[] = microtime(true) - $d["sendtime"];
|
||||||
$this->directDataPacket($d["id"], $d, $d["pid"]);
|
$this->directDataPacket($d["id"], $d, $d["pid"]);
|
||||||
++$this->packetStats[1];
|
++$this->packetStats[1];
|
||||||
$this->lag[] = microtime(true) - $d["sendtime"];
|
|
||||||
unset($this->recovery[$count]);
|
unset($this->recovery[$count]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user