mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +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->packetID = $pk->pid();
|
||||
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ARRANGED;
|
||||
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ORDERED;
|
||||
|
||||
$pk->orderChannel = Player::CHATMESSAGE_ORDER_CHANNEL;
|
||||
$pk->orderIndex = $orderIndex;
|
||||
|
|
@ -556,7 +556,7 @@ class Player{
|
|||
|
||||
$pk = new UnknownPacket;
|
||||
$pk->packetID = $pk->pid();
|
||||
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ARRANGED;
|
||||
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ORDERED;
|
||||
|
||||
$pk->orderChannel = Player::BLOCKUPDATE_ORDER_CHANNEL;
|
||||
$pk->orderIndex = $orderIndex;
|
||||
|
|
@ -594,7 +594,7 @@ class Player{
|
|||
|
||||
$pk = new UnknownPacket;
|
||||
$pk->packetID = $pk->pid();
|
||||
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ARRANGED;
|
||||
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ORDERED;
|
||||
|
||||
$pk->orderChannel = Player::ENTITY_ORDER_CHANNEL;
|
||||
$pk->orderIndex = $orderIndex;
|
||||
|
|
@ -1700,7 +1700,7 @@ class Player{
|
|||
}
|
||||
|
||||
$pk->messageIndex = $this->counter[3]++;
|
||||
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ARRANGED;
|
||||
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ORDERED;
|
||||
$pk->orderChannel = Player::BLOCKUPDATE_ORDER_CHANNEL;
|
||||
$pk->orderIndex = $this->blockUpdateQueueOrderIndex++;
|
||||
@$this->blockUpdateQueue->data[] = $pk;
|
||||
|
|
@ -1745,7 +1745,7 @@ class Player{
|
|||
|
||||
$pk->messageIndex = $this->counter[3]++;
|
||||
|
||||
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ARRANGED;
|
||||
$pk->reliability = RakNetInfo::RELIABILITY_RELIABLE_ORDERED;
|
||||
$pk->orderChannel = Player::ENTITY_ORDER_CHANNEL;
|
||||
$pk->orderIndex = $this->entityDataQueueOrderIndex++;
|
||||
@$this->entityDataQueue->data[] = $pk;
|
||||
|
|
@ -1985,7 +1985,7 @@ class Player{
|
|||
|
||||
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->orderChannel = Player::CHATMESSAGE_ORDER_CHANNEL;
|
||||
$packet->orderIndex = $this->chatMessagesOrderIndex++;
|
||||
|
|
|
|||
|
|
@ -100,10 +100,10 @@ class RakNetCodec{
|
|||
$packet->buffer .= chr(($pk->reliability << 5) | ($pk->hasSplit > 0 ? 0b00010000 : 0));
|
||||
$packet->buffer .= Utils::writeShort(strlen($pk->buffer) << 3);
|
||||
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_WITHACKRECEIPT
|
||||
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_ARRANGED_WITHACKRECEIPT){
|
||||
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_ORDERED_WITHACKRECEIPT){
|
||||
$packet->buffer .= Utils::writeLTriad($pk->messageIndex);
|
||||
}
|
||||
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
|
||||
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_ARRANGED_WITHACKRECEIPT){
|
||||
or $pk->reliability === RakNetInfo::RELIABILITY_RELIABLE_ORDERED_WITHACKRECEIPT){
|
||||
$packet->buffer .= Utils::writeLTriad($pk->orderIndex);
|
||||
$packet->buffer .= chr($pk->orderChannel);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,13 +38,13 @@ abstract class RakNetInfo{
|
|||
const ACK = 0xc0;
|
||||
|
||||
const RELIABILITY_UNRELIABLE = 0;
|
||||
const RELIABILITY_UNRELIABLE_SEQUENCED = 1;
|
||||
const RELIABILITY_RELIABLE = 2;
|
||||
const RELIABILITY_RELIABLE_ARRANGED = 3;
|
||||
const RELIABILITY_RELIABLE_SEQUENCED = 4;
|
||||
const RELIABILITY_UNRELIABLE_WITHACKRECEIPT = 5;
|
||||
const RELIABILITY_RELIABLE_WITHACKRECEIPT = 6;
|
||||
const RELIABILITY_RELIABLE_ARRANGED_WITHACKRECEIPT = 7;
|
||||
const RELIABILITY_UNRELIABLE_SEQUENCED = 1;
|
||||
const RELIABILITY_RELIABLE = 2;
|
||||
const RELIABILITY_RELIABLE_ORDERED = 3;
|
||||
const RELIABILITY_RELIABLE_SEQUENCED = 4;
|
||||
const RELIABILITY_UNRELIABLE_WITHACKRECEIPT = 5;
|
||||
const RELIABILITY_RELIABLE_WITHACKRECEIPT = 6;
|
||||
const RELIABILITY_RELIABLE_ORDERED_WITHACKRECEIPT = 7;
|
||||
|
||||
public static function isValid($pid){
|
||||
return match ((int)$pid) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue