mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 21:19:44 +00:00
small tweaks
This commit is contained in:
parent
f377361ff0
commit
8208e4119c
2 changed files with 10 additions and 2 deletions
|
|
@ -226,7 +226,7 @@ class Player{
|
||||||
$this->chatMessagesQueue->data = [];
|
$this->chatMessagesQueue->data = [];
|
||||||
|
|
||||||
$this->server->schedule(20 * 60, [$this, "clearQueue"], [], true);
|
$this->server->schedule(20 * 60, [$this, "clearQueue"], [], true);
|
||||||
$this->server->interface->maxACKsAllowed["{$this->ip}:{$this->port}"] = 0;
|
$this->server->interface->init($this->ip, $this->port);
|
||||||
$this->evid[] = $this->server->event("server.close", [$this, "close"]);
|
$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);
|
console("[DEBUG] New Session started with $ip:$port. MTU {$this->MTU}, Client ID {$this->clientID}", true, true, 2);
|
||||||
}
|
}
|
||||||
|
|
@ -2032,7 +2032,8 @@ class Player{
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __destruct(){ //pwease dont leak memory >_<
|
public function __destruct(){ //pwease dont leak memory >_<
|
||||||
$this->server->interface->clear($this->ip, $this->port);
|
$server = ServerAPI::request();
|
||||||
|
$server->interface->clear($this->ip, $this->port);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function save(){
|
public function save(){
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,13 @@ class MinecraftInterface{
|
||||||
unset($this->maxRecordedSeq[$id]);
|
unset($this->maxRecordedSeq[$id]);
|
||||||
unset($this->maxNACKsAllowed[$id]);
|
unset($this->maxNACKsAllowed[$id]);
|
||||||
}
|
}
|
||||||
|
public function init($ip, $port){
|
||||||
|
$id = "$ip:$port";
|
||||||
|
$this->maxACKsAllowed[$id] = 0;
|
||||||
|
unset($this->maxRecordedSeq[$id]);
|
||||||
|
$this->maxNACKsAllowed[$id] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue