mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 23:29:54 +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;");
|
||||
|
||||
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;");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user