mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 23:54:35 +00:00
Fix for Issue #166 for Client Not Loading
The issue was with sending the ack mask to the client when the ack byte count was 4.
This commit is contained in:
parent
a98dfb9218
commit
0598b6ae62
1 changed files with 9 additions and 1 deletions
|
|
@ -83,7 +83,15 @@ void ConnectionProtocol::buildSendPacketHeader(BitStream *stream, S32 packetType
|
||||||
stream->writeInt(mLastSeqRecvd & 0x1FF, 9);
|
stream->writeInt(mLastSeqRecvd & 0x1FF, 9);
|
||||||
stream->writeInt(packetType & 0x3, 2);
|
stream->writeInt(packetType & 0x3, 2);
|
||||||
stream->writeInt(ackByteCount & 0x7, 3);
|
stream->writeInt(ackByteCount & 0x7, 3);
|
||||||
stream->writeInt(mAckMask & (~(0xFFFFFFFF << ackByteCount*8)), ackByteCount * 8);
|
U32 bitmask = ~(0xFFFFFFFF << (ackByteCount*8));
|
||||||
|
if(ackByteCount == 4)
|
||||||
|
{
|
||||||
|
// Performing a bit shift that is the same size as the variable being shifted
|
||||||
|
// is undefined in the C/C++ standard. Handle that exception here when
|
||||||
|
// ackByteCount*8 == 4*8 == 32
|
||||||
|
bitmask = 0xFFFFFFFF;
|
||||||
|
}
|
||||||
|
stream->writeInt(mAckMask & bitmask, ackByteCount * 8);
|
||||||
|
|
||||||
// if we're resending this header, we can't advance the
|
// if we're resending this header, we can't advance the
|
||||||
// sequence recieved (in case this packet drops and the prev one
|
// sequence recieved (in case this packet drops and the prev one
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue