more tweaks

This commit is contained in:
GameHerobrine 2023-10-30 07:48:10 +03:00
parent 6c08b74394
commit 426728342f
3 changed files with 23 additions and 14 deletions

View file

@ -106,6 +106,7 @@ class MobController
}
public function rotateTick(){ //TODO handle more rotation
$this->entity->lastHeadYaw = $this->entity->headYaw;
$w180 = Utils::wrapAngleTo180($this->finalHeadYaw - $this->entity->headYaw);
$w180min = min(abs($w180), 20)*Utils::getSign($w180);
$this->entity->headYaw = Utils::wrapAngleTo360($this->entity->headYaw + $w180min);