mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
packets will send every tick, min_possible_speed is 1/8000
This commit is contained in:
parent
39b35aa305
commit
3a1f5a28b1
2 changed files with 12 additions and 11 deletions
|
|
@ -97,7 +97,7 @@ class Player{
|
|||
$this->packetStats = [0, 0];
|
||||
$this->buffer = new RakNetPacket(RakNetInfo::DATA_PACKET_0);
|
||||
$this->buffer->data = [];
|
||||
$this->server->schedule(2, [$this, "handlePacketQueues"], [], true);
|
||||
$this->server->schedule(1, [$this, "handlePacketQueues"], [], true);
|
||||
$this->server->schedule(20 * 60, [$this, "clearQueue"], [], 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);
|
||||
|
|
@ -334,7 +334,7 @@ class Player{
|
|||
$this->bufferLen = 0;
|
||||
$this->buffer = new RakNetPacket(RakNetInfo::DATA_PACKET_0);
|
||||
$this->buffer->data = [];
|
||||
$this->nextBuffer = microtime(true) + 0.1;
|
||||
$this->nextBuffer = microtime(true) + 0.05;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -781,9 +781,6 @@ class Player{
|
|||
$pk = new SetEntityMotionPacket; //TODO one packet for all entities if possible
|
||||
$pk->entities = [[$data->eid, $data->speedX, $data->speedY, $data->speedZ]];
|
||||
$this->dataPacket($pk);
|
||||
$data->lastSpeedZ = $data->speedZ;
|
||||
$data->lastSpeedY = $data->speedY;
|
||||
$data->lastSpeedX = $data->speedX;
|
||||
break;
|
||||
case "entity.animate":
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue