mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
packet sending is not handled by tickerFunction anymore
This commit is contained in:
parent
fc334e7c99
commit
19a66be51a
2 changed files with 6 additions and 2 deletions
|
|
@ -111,7 +111,6 @@ class Player{
|
|||
$this->blockUpdateQueue->data = [];
|
||||
|
||||
//$this->server->schedule(20 * 60, [$this, "clearQueue"], [], true);
|
||||
$this->server->schedule(1, [$this, "handlePacketQueues"], [], true);
|
||||
|
||||
$this->evid[] = $this->server->event("server.close", [$this, "close"]);
|
||||
console("[DEBUG] New Session started with " . $ip . ":" . $port . ". MTU " . $this->MTU . ", Client ID " . $this->clientID, true, true, 2);
|
||||
|
|
@ -1066,8 +1065,8 @@ class Player{
|
|||
if($this->connected === false){
|
||||
return false;
|
||||
}
|
||||
ksort($this->received);
|
||||
if(($cnt = count($this->received)) > PLAYER_MAX_QUEUE){
|
||||
ksort($this->received);
|
||||
foreach($this->received as $c => $t){
|
||||
unset($this->received[$c]);
|
||||
--$cnt;
|
||||
|
|
|
|||
|
|
@ -595,6 +595,11 @@ class PocketMinecraftServer{
|
|||
$this->tickMeasure[] = $this->lastTick = $time;
|
||||
unset($this->tickMeasure[key($this->tickMeasure)]);
|
||||
++$this->ticks;
|
||||
|
||||
foreach($this->clients as $client){
|
||||
$client->handlePacketQueues();
|
||||
}
|
||||
|
||||
foreach($this->api->level->levels as $l){
|
||||
$l->onTick($this, $time);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue