Improved heightmap generation

This commit is contained in:
Shoghi Cervantes
2015-04-29 23:19:27 +02:00
parent 7754aa71a3
commit d4b2e3d1b7
7 changed files with 27 additions and 13 deletions

View File

@@ -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;
}