mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 20:49:43 +00:00
MovePlayerPacket fixed
This commit is contained in:
parent
61ffae58fa
commit
7f70c87a38
2 changed files with 7 additions and 3 deletions
|
|
@ -1360,7 +1360,7 @@ class Player{
|
||||||
$len += strlen($move->buffer) + 1;
|
$len += strlen($move->buffer) + 1;
|
||||||
++$packets;
|
++$packets;
|
||||||
$moveSent = true;
|
$moveSent = true;
|
||||||
}else if($e->headYaw != $e->lastHeadYaw){
|
}else if($this->PROTOCOL > ProtocolInfo12::CURRENT_PROTOCOL_12 && $e->headYaw != $e->lastHeadYaw){
|
||||||
$headyaw = new RotateHeadPacket();
|
$headyaw = new RotateHeadPacket();
|
||||||
$headyaw->eid = $e->eid;
|
$headyaw->eid = $e->eid;
|
||||||
$headyaw->yaw = $e->headYaw;
|
$headyaw->yaw = $e->headYaw;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,9 @@ class MovePlayerPacket extends RakNetDataPacket{
|
||||||
$this->z = $this->getFloat();
|
$this->z = $this->getFloat();
|
||||||
$this->yaw = $this->getFloat();
|
$this->yaw = $this->getFloat();
|
||||||
$this->pitch = $this->getFloat();
|
$this->pitch = $this->getFloat();
|
||||||
$this->bodyYaw = $this->getFloat();
|
if($this->PROTOCOL > 13){
|
||||||
|
$this->bodyYaw = $this->getFloat();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function encode(){
|
public function encode(){
|
||||||
|
|
@ -34,7 +36,9 @@ class MovePlayerPacket extends RakNetDataPacket{
|
||||||
$this->putFloat($this->z);
|
$this->putFloat($this->z);
|
||||||
$this->putFloat($this->yaw);
|
$this->putFloat($this->yaw);
|
||||||
$this->putFloat($this->pitch);
|
$this->putFloat($this->pitch);
|
||||||
$this->putFloat($this->bodyYaw);
|
if($this->PROTOCOL > 13){
|
||||||
|
$this->putFloat($this->bodyYaw);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue