pathfoillower fix

This commit is contained in:
GameHerobrine 2023-03-05 20:42:47 +03:00
parent a3fda45979
commit 27f0231f2c

View file

@ -11,6 +11,9 @@ class PathFollower{
}
public function followPath(){
if(!isset($this->entity) || !($this->entity instanceof Living)) return;
if($this->entity->path != null && (is_array($this->entity->path) && count($this->entity->path) <= 0 || $this->entity->currentIndex >= count($this->entity->path))){
$this->entity->path = null;
$this->entity->currentIndex = 0;