mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
ai tweaks, pitch and yaw should be always updated(not only when pos changed)
This commit is contained in:
parent
8b036abf8e
commit
be9a9c0c0d
8 changed files with 17 additions and 34 deletions
|
|
@ -6,7 +6,7 @@ class TaskLookAround extends TaskBase
|
|||
public function onStart(EntityAI $ai)
|
||||
{
|
||||
$this->selfCounter = 1;
|
||||
$this->rotation = mt_rand(-180,180);
|
||||
$this->rotation = mt_rand(-90, 90);
|
||||
}
|
||||
|
||||
public function onEnd(EntityAI $ai)
|
||||
|
|
@ -16,7 +16,7 @@ class TaskLookAround extends TaskBase
|
|||
|
||||
public function canBeExecuted(EntityAI $ai)
|
||||
{
|
||||
return !$ai->entity->isMoving() && Utils::randomFloat() < 0.02;
|
||||
return !$ai->entity->isMoving() && Utils::randomFloat() < 0.04;
|
||||
}
|
||||
|
||||
public function onUpdate(EntityAI $ai)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue