mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 07:39:57 +00:00
Final fix #324
This commit is contained in:
parent
89ef299333
commit
1f4df559e0
@ -50,17 +50,13 @@ class EntityAPI{
|
|||||||
$l = $this->server->query("SELECT EID FROM entities WHERE hasUpdate = 1;");
|
$l = $this->server->query("SELECT EID FROM entities WHERE hasUpdate = 1;");
|
||||||
|
|
||||||
if($l !== false and $l !== true){
|
if($l !== false and $l !== true){
|
||||||
$q = "";
|
|
||||||
while(($e = $l->fetchArray(SQLITE3_ASSOC)) !== false){
|
while(($e = $l->fetchArray(SQLITE3_ASSOC)) !== false){
|
||||||
$e = $this->get($e["EID"]);
|
$e = $this->get($e["EID"]);
|
||||||
if($e instanceof Entity){
|
if($e instanceof Entity){
|
||||||
$e->update();
|
$e->update();
|
||||||
$q .= "UPDATE entities SET hasUpdate = 0 WHERE EID = ".$e->eid.";";
|
$this->server->query("UPDATE entities SET hasUpdate = 0 WHERE EID = ".$e->eid.";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($q !== ""){
|
|
||||||
$this->server->query("BEGIN TRANSACTION;".$q."COMMIT;");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user