php8 explosion fixes

This commit is contained in:
GameHerobrine 2022-12-26 03:20:33 +03:00
parent 2cdf3ca8da
commit 6086c80dad
3 changed files with 17 additions and 3 deletions

View file

@ -18,6 +18,8 @@ class EntityAI
public $lastTask;
public $counter = 0;
public function __construct($entity){
$this->entity = $entity;
$this->tasks = [];
@ -47,6 +49,9 @@ class EntityAI
}
public function updateTasks(){
if($this->counter % 3 != 0){
return;
}
foreach($this->tasks as $t){
if(!$t->isStarted && $t->canBeExecuted($this)){
$t->isStarted = true;