mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
arranged > ordered
This commit is contained in:
parent
44348c84a4
commit
421b7b26e1
3 changed files with 17 additions and 17 deletions
|
|
@ -519,7 +519,7 @@ class Player{
|
||||||
|
|
||||||
$pk = new UnknownPacket;
|
$pk = new UnknownPacket;
|
||||||
$pk->packetID = $pk->pid();
|
$pk->packetID = $pk->pid();
|
||||||
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ARRANGED;
|
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ORDERED;
|
||||||
|
|
||||||
$pk->orderChannel = Player::CHATMESSAGE_ORDER_CHANNEL;
|
$pk->orderChannel = Player::CHATMESSAGE_ORDER_CHANNEL;
|
||||||
$pk->orderIndex = $orderIndex;
|
$pk->orderIndex = $orderIndex;
|
||||||
|
|
@ -556,7 +556,7 @@ class Player{
|
||||||
|
|
||||||
$pk = new UnknownPacket;
|
$pk = new UnknownPacket;
|
||||||
$pk->packetID = $pk->pid();
|
$pk->packetID = $pk->pid();
|
||||||
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ARRANGED;
|
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ORDERED;
|
||||||
|
|
||||||
$pk->orderChannel = Player::BLOCKUPDATE_ORDER_CHANNEL;
|
$pk->orderChannel = Player::BLOCKUPDATE_ORDER_CHANNEL;
|
||||||
$pk->orderIndex = $orderIndex;
|
$pk->orderIndex = $orderIndex;
|
||||||
|
|
@ -594,7 +594,7 @@ class Player{
|
||||||
|
|
||||||
$pk = new UnknownPacket;
|
$pk = new UnknownPacket;
|
||||||
$pk->packetID = $pk->pid();
|
$pk->packetID = $pk->pid();
|
||||||
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ARRANGED;
|
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ORDERED;
|
||||||
|
|
||||||
$pk->orderChannel = Player::ENTITY_ORDER_CHANNEL;
|
$pk->orderChannel = Player::ENTITY_ORDER_CHANNEL;
|
||||||
$pk->orderIndex = $orderIndex;
|
$pk->orderIndex = $orderIndex;
|
||||||
|
|
@ -1700,7 +1700,7 @@ class Player{
|
||||||
}
|
}
|
||||||
|
|
||||||
$pk->messageIndex = $this->counter[3]++;
|
$pk->messageIndex = $this->counter[3]++;
|
||||||
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ARRANGED;
|
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ORDERED;
|
||||||
$pk->orderChannel = Player::BLOCKUPDATE_ORDER_CHANNEL;
|
$pk->orderChannel = Player::BLOCKUPDATE_ORDER_CHANNEL;
|
||||||
$pk->orderIndex = $this->blockUpdateQueueOrderIndex++;
|
$pk->orderIndex = $this->blockUpdateQueueOrderIndex++;
|
||||||
@$this->blockUpdateQueue->data[] = $pk;
|
@$this->blockUpdateQueue->data[] = $pk;
|
||||||
|
|
@ -1745,7 +1745,7 @@ class Player{
|
||||||
|
|
||||||
$pk->messageIndex = $this->counter[3]++;
|
$pk->messageIndex = $this->counter[3]++;
|
||||||
|
|
||||||
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ARRANGED;
|
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ORDERED;
|
||||||
$pk->orderChannel = Player::ENTITY_ORDER_CHANNEL;
|
$pk->orderChannel = Player::ENTITY_ORDER_CHANNEL;
|
||||||
$pk->orderIndex = $this->entityDataQueueOrderIndex++;
|
$pk->orderIndex = $this->entityDataQueueOrderIndex++;
|
||||||
@$this->entityDataQueue->data[] = $pk;
|
@$this->entityDataQueue->data[] = $pk;
|
||||||
|
|
@ -1985,7 +1985,7 @@ class Player{
|
||||||
|
|
||||||
if(($this->chatMessagesQueueLength + $len) >= $MTU) $this->sendChatBuffer();
|
if(($this->chatMessagesQueueLength + $len) >= $MTU) $this->sendChatBuffer();
|
||||||
|
|
||||||
$packet->reliability = RakNetInfo::RELIABILITY_RELIABLE_ARRANGED;
|
$packet->reliability = RakNetInfo::RELIABILITY_RELIABLE_ORDERED;
|
||||||
$packet->messageIndex = $this->counter[3]++;
|
$packet->messageIndex = $this->counter[3]++;
|
||||||
$packet->orderChannel = Player::CHATMESSAGE_ORDER_CHANNEL;
|
$packet->orderChannel = Player::CHATMESSAGE_ORDER_CHANNEL;
|
||||||
$packet->orderIndex = $this->chatMessagesOrderIndex++;
|
$packet->orderIndex = $this->chatMessagesOrderIndex++;
|
||||||
|
|
|
||||||
|
|
@ -100,10 +100,10 @@ class RakNetCodec{
|
||||||
$packet->buffer .= chr(($pk->reliability << 5) | ($pk->hasSplit > 0 ? 0b00010000 : 0));
|
$packet->buffer .= chr(($pk->reliability << 5) | ($pk->hasSplit > 0 ? 0b00010000 : 0));
|
||||||
$packet->buffer .= Utils::writeShort(strlen($pk->buffer) << 3);
|
$packet->buffer .= Utils::writeShort(strlen($pk->buffer) << 3);
|
||||||
if($pk->reliability === RakNetInfo::RELIABILITY_RELIABLE
|
if($pk->reliability === RakNetInfo::RELIABILITY_RELIABLE
|
||||||
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_ARRANGED
|
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_ORDERED
|
||||||
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_SEQUENCED
|
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_SEQUENCED
|
||||||
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_WITHACKRECEIPT
|
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_WITHACKRECEIPT
|
||||||
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_ARRANGED_WITHACKRECEIPT){
|
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_ORDERED_WITHACKRECEIPT){
|
||||||
$packet->buffer .= Utils::writeLTriad($pk->messageIndex);
|
$packet->buffer .= Utils::writeLTriad($pk->messageIndex);
|
||||||
}
|
}
|
||||||
if($pk->reliability == RakNetInfo::RELIABILITY_UNRELIABLE_SEQUENCED || $pk->reliability == RakNetInfo::RELIABILITY_RELIABLE_SEQUENCED){
|
if($pk->reliability == RakNetInfo::RELIABILITY_UNRELIABLE_SEQUENCED || $pk->reliability == RakNetInfo::RELIABILITY_RELIABLE_SEQUENCED){
|
||||||
|
|
@ -111,9 +111,9 @@ class RakNetCodec{
|
||||||
}
|
}
|
||||||
|
|
||||||
if($pk->reliability === RakNetInfo::RELIABILITY_UNRELIABLE_SEQUENCED
|
if($pk->reliability === RakNetInfo::RELIABILITY_UNRELIABLE_SEQUENCED
|
||||||
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_ARRANGED
|
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_ORDERED
|
||||||
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_SEQUENCED
|
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_SEQUENCED
|
||||||
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_ARRANGED_WITHACKRECEIPT){
|
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_ORDERED_WITHACKRECEIPT){
|
||||||
$packet->buffer .= Utils::writeLTriad($pk->orderIndex);
|
$packet->buffer .= Utils::writeLTriad($pk->orderIndex);
|
||||||
$packet->buffer .= chr($pk->orderChannel);
|
$packet->buffer .= chr($pk->orderChannel);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,13 +38,13 @@ abstract class RakNetInfo{
|
||||||
const ACK = 0xc0;
|
const ACK = 0xc0;
|
||||||
|
|
||||||
const RELIABILITY_UNRELIABLE = 0;
|
const RELIABILITY_UNRELIABLE = 0;
|
||||||
const RELIABILITY_UNRELIABLE_SEQUENCED = 1;
|
const RELIABILITY_UNRELIABLE_SEQUENCED = 1;
|
||||||
const RELIABILITY_RELIABLE = 2;
|
const RELIABILITY_RELIABLE = 2;
|
||||||
const RELIABILITY_RELIABLE_ARRANGED = 3;
|
const RELIABILITY_RELIABLE_ORDERED = 3;
|
||||||
const RELIABILITY_RELIABLE_SEQUENCED = 4;
|
const RELIABILITY_RELIABLE_SEQUENCED = 4;
|
||||||
const RELIABILITY_UNRELIABLE_WITHACKRECEIPT = 5;
|
const RELIABILITY_UNRELIABLE_WITHACKRECEIPT = 5;
|
||||||
const RELIABILITY_RELIABLE_WITHACKRECEIPT = 6;
|
const RELIABILITY_RELIABLE_WITHACKRECEIPT = 6;
|
||||||
const RELIABILITY_RELIABLE_ARRANGED_WITHACKRECEIPT = 7;
|
const RELIABILITY_RELIABLE_ORDERED_WITHACKRECEIPT = 7;
|
||||||
|
|
||||||
public static function isValid($pid){
|
public static function isValid($pid){
|
||||||
return match ((int)$pid) {
|
return match ((int)$pid) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue