mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
Player: don't waste CPU time ordering chunks for non-moving players
This commit is contained in:
parent
e0e2e1775f
commit
77b9feb3c0
@ -1073,8 +1073,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
|
||||
Timings::$playerChunkOrderTimer->startTiming();
|
||||
|
||||
$this->nextChunkOrderRun = 200;
|
||||
|
||||
$radius = $this->server->getAllowedViewDistance($this->viewDistance);
|
||||
$radiusSquared = $radius ** 2;
|
||||
|
||||
@ -1772,7 +1770,8 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
return;
|
||||
}
|
||||
|
||||
if($this->nextChunkOrderRun-- <= 0){
|
||||
if($this->nextChunkOrderRun !== PHP_INT_MAX and $this->nextChunkOrderRun-- <= 0){
|
||||
$this->nextChunkOrderRun = PHP_INT_MAX;
|
||||
$this->orderChunks();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user