project uses tabs instead of spaces(as in CONTRIBUTING.md)

This commit is contained in:
GameHerobrine 2022-12-26 07:01:28 +03:00
parent f00318b6ed
commit 62571f26cd
115 changed files with 2291 additions and 2364 deletions

View file

@ -25,30 +25,30 @@ abstract class Creature extends Living{
}
public function update(){
if($this->onGround){
/*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))){
$this->path = null;
$this->currentIndex = 0;
$this->currentNode = false;
}elseif($this->path != null && ($this->currentNode == false || $this->ai->mobController->moveTo($this->currentNode->x, $this->currentNode->y, $this->currentNode->z) === false)){
$this->currentNode = $this->path[$this->currentIndex++];
}*/
}
parent::update();
if($this->onGround){
/*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))){
$this->path = null;
$this->currentIndex = 0;
$this->currentNode = false;
}elseif($this->path != null && ($this->currentNode == false || $this->ai->mobController->moveTo($this->currentNode->x, $this->currentNode->y, $this->currentNode->z) === false)){
$this->currentNode = $this->path[$this->currentIndex++];
}*/
}
parent::update();
}
public function createSaveData(){
$data = parent::createSaveData();
$data["State"] = @$this->getState();
return $data;
$data = parent::createSaveData();
$data["State"] = @$this->getState();
return $data;
}
public function getSpeedModifer(){
return $this->speedModifer * ($this->inPanic ? 1.4 : 0.7);
return $this->speedModifer * ($this->inPanic ? 1.4 : 0.7);
}
public function spawn($player){