mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
tweaks to headYaw rotation, so it should be nearly perfect now
This commit is contained in:
parent
a5a0c0e000
commit
e4d1898613
5 changed files with 26 additions and 16 deletions
|
|
@ -733,6 +733,9 @@ class Entity extends Position
|
|||
if($this->closed === true){
|
||||
return false;
|
||||
}
|
||||
if($this->lastHeadYaw != $this->headYaw){
|
||||
$this->sendHeadYaw();
|
||||
}
|
||||
$now = microtime(true);
|
||||
if($this->isStatic === false and ($this->lastX != $this->x or $this->lastY != $this->y or $this->lastZ != $this->z or $this->lastYaw != $this->yaw or $this->lastPitch != $this->pitch or $this->lastHeadYaw != $this->headYaw)){
|
||||
if($this->class === ENTITY_PLAYER or ($this->last[5] + 8) < $now){
|
||||
|
|
@ -770,15 +773,10 @@ class Entity extends Position
|
|||
}
|
||||
} else{
|
||||
$this->updatePosition();
|
||||
if($this->lastHeadYaw != $this->headYaw){
|
||||
$this->sendHeadYaw();
|
||||
}
|
||||
$this->updateLast();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$this->lastUpdate = $now;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue