mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 12:04:46 +00:00
Improved heightmap generation
This commit is contained in:
@@ -2186,7 +2186,7 @@ class Server{
|
||||
private function tickProcessor(){
|
||||
while($this->isRunning){
|
||||
$this->tick();
|
||||
usleep((int) max(1, ($this->nextTick - microtime(true)) * 1000000));
|
||||
usleep((int) max(1, ($this->nextTick - microtime(true)) * 1000000 - 2000));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2369,7 +2369,7 @@ class Server{
|
||||
*/
|
||||
private function tick(){
|
||||
$tickTime = microtime(true);
|
||||
if($tickTime < $this->nextTick){
|
||||
if(($tickTime - $this->nextTick) < -0.025){ //Allow half a tick of diff
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user