mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-24 13:39:44 +00:00
pathfoillower fix
This commit is contained in:
parent
a3fda45979
commit
27f0231f2c
1 changed files with 3 additions and 0 deletions
|
|
@ -11,6 +11,9 @@ class PathFollower{
|
||||||
}
|
}
|
||||||
|
|
||||||
public function followPath(){
|
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))){
|
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->path = null;
|
||||||
$this->entity->currentIndex = 0;
|
$this->entity->currentIndex = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue