[raknet] Match ReliabilityLayer::GetBitStreamHeaderLength(...)

This commit is contained in:
RD42
2025-04-28 23:12:40 -07:00
parent 5dc4a094e6
commit b6273cdd25
2 changed files with 3 additions and 1 deletions

View File

@ -1610,7 +1610,7 @@ int ReliabilityLayer::GetBitStreamHeaderLength( const InternalPacket *const inte
// Write the PacketReliability. This is encoded in 3 bits // Write the PacketReliability. This is encoded in 3 bits
//bitStream->WriteBits((unsigned char*)&(internalPacket->reliability), 3, true); //bitStream->WriteBits((unsigned char*)&(internalPacket->reliability), 3, true);
bitLength += 3; bitLength += reliabilitySizeInBits;
// If the reliability requires an ordering channel and ordering index, we Write those. // If the reliability requires an ordering channel and ordering index, we Write those.
if ( internalPacket->reliability == UNRELIABLE_SEQUENCED || internalPacket->reliability == RELIABLE_SEQUENCED || internalPacket->reliability == RELIABLE_ORDERED ) if ( internalPacket->reliability == UNRELIABLE_SEQUENCED || internalPacket->reliability == RELIABLE_SEQUENCED || internalPacket->reliability == RELIABLE_ORDERED )

View File

@ -315,6 +315,8 @@ private:
unsigned int blockWindowIncreaseUntilTime; unsigned int blockWindowIncreaseUntilTime;
RakNetStatisticsStruct statistics; RakNetStatisticsStruct statistics;
unsigned reliabilitySizeInBits;
/// Memory-efficient receivedPackets algorithm: /// Memory-efficient receivedPackets algorithm:
/// receivedPacketsBaseIndex is the packet number we are expecting /// receivedPacketsBaseIndex is the packet number we are expecting
/// Everything under receivedPacketsBaseIndex is a packet we already got /// Everything under receivedPacketsBaseIndex is a packet we already got