mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 21:19:44 +00:00
Final fix #324
This commit is contained in:
parent
89ef299333
commit
1f4df559e0
1 changed files with 1 additions and 5 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue