mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +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
|
|
@ -713,14 +713,15 @@ class Entity extends Position
|
|||
if($this->hasGravity && $support === false){
|
||||
$this->speedY -= ($this->class === ENTITY_FALLING) ? 0.04 : ($this->class === ENTITY_ITEM ? 0.06 : 0.08); // TODO: replace with $gravity
|
||||
$update = true;
|
||||
} elseif($this->lastX != $this->x && $this->lastZ != $this->z & $this->lastY != $this->z){
|
||||
} elseif($this->lastX != $this->x || $this->lastZ != $this->z || $this->lastY != $this->z){
|
||||
// $this->speedX = 0;
|
||||
// $this->speedY = 0;
|
||||
// $this->speedZ = 0;
|
||||
$this->server->api->handle("entity.move", $this);
|
||||
$update = true;
|
||||
|
||||
}
|
||||
}elseif($this->lastYaw != $this->yaw || $this->lastPitch != $this->pitch){
|
||||
$update = true;
|
||||
}
|
||||
|
||||
if($update === true){
|
||||
$hasUpdate = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue