Fixed a few things

REALLY BUGGY!!! DO NOT USE THIS!
This commit is contained in:
Shoghi Cervantes Pueyo 2013-03-31 15:03:13 +02:00
parent ecc2faffea
commit f53877c070

View File

@ -130,13 +130,13 @@ class Player{
"x" => '.$X.',
"z" => '.$Z.',
"data" => $d,
), true);
));
}
$tiles = $this->server->query("SELECT * FROM tileentities WHERE spawnable = 1 AND x >= '.$x.' AND x < '.($x + 16).' AND z >= '.$z.' AND z < '.($z + 16).' AND y >= '.$y.' AND y < '.($y + 16).';");
if($tiles !== false and $tiles !== true){
while(($tile = $tiles->fetchArray(SQLITE3_ASSOC)) !== false){
$this->server->api->tileentity->spawnTo($tile["ID"], "'.$this->username.'", true);
$this->server->api->tileentity->spawnTo($tile["ID"], "'.$this->username.'");
}
}
$this->actionQueue(\'$this->getNextChunk();\');
@ -153,8 +153,8 @@ class Player{
$this->close("timeout");
}else{
if(!empty($this->queue)){
$maxtime = $time + 0.0025;
while(microtime(true) < $maxtime){
$cnt = 0;
while($cnt < 4){
$p = array_shift($this->queue);
if($p === null){
break;
@ -167,6 +167,7 @@ class Player{
eval($p[1]);
break;
}
++$cnt;
}
}