mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 22:10:36 +00:00
Merge pull request #167 from DavidWyand-GG/issue166-ClientNotLoading
Fix for Issue #166 for Client Not Loading
This commit is contained in:
commit
37f44a6341
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(packetType & 0x3, 2);
|
||||
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
|
||||
// sequence recieved (in case this packet drops and the prev one
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue