mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
fixed several chunks not being received by client if they were teleported by server before ready packet
This commit is contained in:
parent
a032856009
commit
3580b884d8
1 changed files with 2 additions and 3 deletions
|
|
@ -311,7 +311,7 @@ class Player{
|
|||
$this->entity->calculateVelocity();
|
||||
if($terrain === true){
|
||||
$this->orderChunks();
|
||||
$this->getNextChunk($this->level);
|
||||
if($this->spawned) $this->getNextChunk($this->level);
|
||||
}
|
||||
$this->entity->check = true;
|
||||
if($force === true){
|
||||
|
|
@ -575,7 +575,6 @@ class Player{
|
|||
if($this->connected === false or $world != $this->level){
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach($this->chunkCount as $count => $t){
|
||||
if(isset($this->recoveryQueue[$count]) or isset($this->resendQueue[$count])){
|
||||
$this->server->schedule(MAX_CHUNK_RATE, [$this, "getNextChunk"], $world);
|
||||
|
|
@ -1730,9 +1729,9 @@ class Player{
|
|||
|
||||
$pos = new Position($this->entity->x, $this->entity->y, $this->entity->z, $this->level);
|
||||
$pData = $this->data->get("position");
|
||||
$this->teleport($pos, $pData["yaw"] ?? false, $pData["pitch"] ?? false, true, true);
|
||||
$this->entity->setHealth($this->data->get("health"), "spawn", true, false);
|
||||
$this->spawned = true;
|
||||
$this->teleport($pos, $pData["yaw"] ?? false, $pData["pitch"] ?? false, true, true);
|
||||
$this->server->api->player->spawnAllPlayers($this);
|
||||
$this->server->api->player->spawnToAllPlayers($this);
|
||||
$this->server->api->entity->spawnAll($this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue