Raised buffer time

This commit is contained in:
Shoghi Cervantes Pueyo 2013-03-20 18:14:04 +01:00
parent 5e44ecf63b
commit 57df6e61aa

View File

@ -30,7 +30,7 @@ class Player{
private $server; private $server;
private $queue = array(); private $queue = array();
private $buffer = ""; private $buffer = "";
private $lastBuffer = 0; private $nextBuffer = 0;
private $recovery = array(); private $recovery = array();
private $evid = array(); private $evid = array();
public $lastMovement = 0; public $lastMovement = 0;
@ -155,7 +155,7 @@ class Player{
if($time > $this->timeout){ if($time > $this->timeout){
$this->close("timeout"); $this->close("timeout");
}else{ }else{
if($this->lastBuffer <= $time and strlen($this->buffer) > 0){ if($this->nextBuffer <= $time and strlen($this->buffer) > 0){
$this->sendBuffer(); $this->sendBuffer();
} }
@ -1029,7 +1029,7 @@ class Player{
} }
$this->buffer = ""; $this->buffer = "";
$this->lastBuffer = microtime(true) + 0.05; $this->nextBuffer = microtime(true) + 0.1;
} }
public function directDataPacket($id, $data){ public function directDataPacket($id, $data){