NetworkSession: allow Player to handle its own business in chunk sending

these checks should appear consistently in all of these async callbacks.
This commit is contained in:
Dylan K. Taylor
2021-03-26 22:00:42 +00:00
parent f047ecfd2d
commit a223d1cbf3
2 changed files with 5 additions and 6 deletions

View File

@ -916,11 +916,6 @@ class NetworkSession{
if(!$this->isConnected()){
return;
}
$currentWorld = $this->player->getLocation()->getWorld();
if($world !== $currentWorld or !$this->player->isUsingChunk($chunkX, $chunkZ)){
$this->logger->debug("Tried to send no-longer-active chunk $chunkX $chunkZ in world " . $world->getFolderName());
return;
}
$currentWorld->timings->syncChunkSend->startTiming();
try{
$this->queueCompressed($promise);