mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
fixed sequenced packets, entity movement uses unrealible_sequenced
This commit is contained in:
parent
6d10cfd896
commit
385f15f1bb
4 changed files with 31 additions and 14 deletions
|
|
@ -106,6 +106,9 @@ class RakNetCodec{
|
|||
or $pk->reliability === 7){
|
||||
$packet->buffer .= Utils::writeLTriad($pk->messageIndex);
|
||||
}
|
||||
if($pk->reliability == 1 || $pk->reliability == 4){
|
||||
$packet->buffer .= Utils::writeLTriad($pk->seqIndex);
|
||||
}
|
||||
|
||||
if($pk->reliability === 1
|
||||
or $pk->reliability === 3
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ abstract class RakNetDataPacket extends stdClass{
|
|||
public $splitCount;
|
||||
public $splitID;
|
||||
public $splitIndex;
|
||||
public $seqIndex;
|
||||
private $offset = 0;
|
||||
|
||||
public abstract function encode();
|
||||
|
|
|
|||
|
|
@ -124,6 +124,12 @@ class RakNetParser{
|
|||
}else{
|
||||
$messageIndex = false;
|
||||
}
|
||||
if($reliability == 1 || $reliability == 4){
|
||||
$offset += 3;
|
||||
$seqIndex = Utils::readTriad(strrev(substr($buffer, $offset - 3, 3)));
|
||||
}else{
|
||||
$seqIndex = false;
|
||||
}
|
||||
|
||||
if($reliability == 1 ||$reliability == 3 || $reliability == 4 || $reliability == 7){
|
||||
$offset += 3;
|
||||
|
|
@ -228,6 +234,7 @@ class RakNetParser{
|
|||
$data->splitCount = $splitCount;
|
||||
$data->splitID = $splitID;
|
||||
$data->splitIndex = $splitIndex;
|
||||
$data->seqIndex = $seqIndex;
|
||||
$data->localEids = true;
|
||||
$data->setBuffer($buf);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue