mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 03:51:37 +00:00
Final fix #324
This commit is contained in:
@@ -50,17 +50,13 @@ class EntityAPI{
|
||||
$l = $this->server->query("SELECT EID FROM entities WHERE hasUpdate = 1;");
|
||||
|
||||
if($l !== false and $l !== true){
|
||||
$q = "";
|
||||
while(($e = $l->fetchArray(SQLITE3_ASSOC)) !== false){
|
||||
$e = $this->get($e["EID"]);
|
||||
if($e instanceof Entity){
|
||||
$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;");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user