Fixed entities being updated when they shouldn't

This commit is contained in:
Shoghi Cervantes 2013-06-05 12:11:04 +02:00
parent 2dd188a0bd
commit a5bc95e733
2 changed files with 4 additions and 7 deletions

View file

@ -498,11 +498,7 @@ class PocketMinecraftServer{
if(!is_callable($callback)){
return false;
}
$add = "";
$chcnt = $this->scheduleCnt++;
if($repeat === false){
$add = '$this->schedule['.$chcnt.']=null;unset($this->schedule['.$chcnt.']);';
}
$this->schedule[$chcnt] = array($callback, $data, $eventName);
$this->query("INSERT INTO actions (ID, interval, last, repeat) VALUES(".$chcnt.", ".($ticks / 20).", ".microtime(true).", ".(((bool) $repeat) === true ? 1:0).");");
return $chcnt;