Fixed entity despawning

This commit is contained in:
Shoghi Cervantes Pueyo 2013-01-09 18:05:25 +01:00
parent b9b0039cd7
commit 2801f18753
2 changed files with 3 additions and 3 deletions

View file

@ -163,10 +163,8 @@ class Entity extends stdClass{
public function close(){
if($this->closed === false){
$this->server->query("DELETE FROM entities WHERE EID = ".$this->eid.";");
$this->server->api->dhandle("entity.remove", $this);
$this->server->api->entity->remove($this->eid);
$this->closed = true;
$this->__destruct();
}
}