simple autojump, more vanilla speed

This commit is contained in:
GameHerobrine 2024-02-01 07:19:59 +03:00
parent d0a262a3da
commit dee744e709
15 changed files with 52 additions and 35 deletions

View file

@ -4,9 +4,9 @@ class TaskPanic extends TaskBase
{
protected $randX = 2, $randZ = 2;
public $moveSpeed;
public function __construct($moveSpeed){
$this->moveSpeed = $moveSpeed;
public $speedMultiplier;
public function __construct($speedMultiplier){
$this->speedMultiplier = $speedMultiplier;
}
public function onStart(EntityAI $ai)
@ -34,7 +34,7 @@ class TaskPanic extends TaskBase
{
--$this->selfCounter;
if($this->selfCounter % 20 === 0) $this->regenerateRandXZ();
$ai->mobController->setMovingOffset($this->randX, 0, $this->randZ, $this->moveSpeed);
$ai->mobController->setMovingOffset($this->randX, 0, $this->randZ, $this->speedMultiplier);
}
public function canBeExecuted(EntityAI $ai)