small changes

This commit is contained in:
GameHerobrine 2022-12-26 05:19:03 +03:00
parent 6086c80dad
commit f00318b6ed
2 changed files with 16 additions and 14 deletions

View file

@ -26,7 +26,7 @@ abstract class Creature extends Living{
public function update(){
if($this->onGround){
/*if($this->path === null && $this->pathFinder instanceof ITileNavigator && mt_rand(0, 120) === 0){
/*if($this->path === null && $this->pathFinder instanceof ITileNavigator){ // mt_rand(0, 120) === 0){
$this->path = $this->pathFinder->navigate(new PathTileXYZ($this->x, $this->y, $this->z, $this->level), new PathTileXYZ($this->x + mt_rand(-10, 10), $this->y, $this->z + mt_rand(-10, 10), $this->level));
}
if($this->path != null && (is_array($this->path) && count($this->path) <= 0 || $this->currentIndex >= count($this->path))){