mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-08 04:38:35 +00:00
DataPacket: rename split-screen bytes
This commit is contained in:
parent
18b287c3ea
commit
e56e363dcc
@ -37,9 +37,9 @@ abstract class DataPacket extends NetworkBinaryStream{
|
|||||||
public $isEncoded = false;
|
public $isEncoded = false;
|
||||||
|
|
||||||
/** @var int */
|
/** @var int */
|
||||||
public $extraByte1 = 0;
|
public $senderSubId = 0;
|
||||||
/** @var int */
|
/** @var int */
|
||||||
public $extraByte2 = 0;
|
public $recipientSubId = 0;
|
||||||
|
|
||||||
public function pid(){
|
public function pid(){
|
||||||
return $this::NETWORK_ID;
|
return $this::NETWORK_ID;
|
||||||
@ -75,9 +75,9 @@ abstract class DataPacket extends NetworkBinaryStream{
|
|||||||
$pid = $this->getUnsignedVarInt();
|
$pid = $this->getUnsignedVarInt();
|
||||||
assert($pid === static::NETWORK_ID);
|
assert($pid === static::NETWORK_ID);
|
||||||
|
|
||||||
$this->extraByte1 = $this->getByte();
|
$this->senderSubId = $this->getByte();
|
||||||
$this->extraByte2 = $this->getByte();
|
$this->recipientSubId = $this->getByte();
|
||||||
assert($this->extraByte1 === 0 and $this->extraByte2 === 0, "Got unexpected non-zero split-screen bytes (byte1: $this->extraByte1, byte2: $this->extraByte2");
|
assert($this->senderSubId === 0 and $this->recipientSubId === 0, "Got unexpected non-zero split-screen bytes (byte1: $this->senderSubId, byte2: $this->recipientSubId");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -97,8 +97,8 @@ abstract class DataPacket extends NetworkBinaryStream{
|
|||||||
protected function encodeHeader(){
|
protected function encodeHeader(){
|
||||||
$this->putUnsignedVarInt(static::NETWORK_ID);
|
$this->putUnsignedVarInt(static::NETWORK_ID);
|
||||||
|
|
||||||
$this->putByte($this->extraByte1);
|
$this->putByte($this->senderSubId);
|
||||||
$this->putByte($this->extraByte2);
|
$this->putByte($this->recipientSubId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user