mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-12 12:55:21 +00:00
Fixed a few things
REALLY BUGGY!!! DO NOT USE THIS!
This commit is contained in:
parent
ecc2faffea
commit
f53877c070
@ -130,13 +130,13 @@ class Player{
|
|||||||
"x" => '.$X.',
|
"x" => '.$X.',
|
||||||
"z" => '.$Z.',
|
"z" => '.$Z.',
|
||||||
"data" => $d,
|
"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).';");
|
$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){
|
if($tiles !== false and $tiles !== true){
|
||||||
while(($tile = $tiles->fetchArray(SQLITE3_ASSOC)) !== false){
|
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();\');
|
$this->actionQueue(\'$this->getNextChunk();\');
|
||||||
@ -153,8 +153,8 @@ class Player{
|
|||||||
$this->close("timeout");
|
$this->close("timeout");
|
||||||
}else{
|
}else{
|
||||||
if(!empty($this->queue)){
|
if(!empty($this->queue)){
|
||||||
$maxtime = $time + 0.0025;
|
$cnt = 0;
|
||||||
while(microtime(true) < $maxtime){
|
while($cnt < 4){
|
||||||
$p = array_shift($this->queue);
|
$p = array_shift($this->queue);
|
||||||
if($p === null){
|
if($p === null){
|
||||||
break;
|
break;
|
||||||
@ -167,6 +167,7 @@ class Player{
|
|||||||
eval($p[1]);
|
eval($p[1]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
++$cnt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user