diff --git a/raknet/RakPeer.cpp b/raknet/RakPeer.cpp index 9c89b3d..595a311 100644 --- a/raknet/RakPeer.cpp +++ b/raknet/RakPeer.cpp @@ -2585,7 +2585,7 @@ void RakPeer::OnConnectionRequest( RakPeer::RemoteSystemStruct *remoteSystem, un } #endif - RakNet::BitStream bitStream(sizeof(unsigned char)+sizeof(unsigned short)+sizeof(unsigned int)+sizeof(unsigned short)+sizeof(PlayerIndex)); + RakNet::BitStream bitStream(sizeof(unsigned char)+sizeof(unsigned short)+sizeof(unsigned int)+sizeof(unsigned short)+sizeof(PlayerIndex)+sizeof(unsigned int)); bitStream.Write((unsigned char)ID_CONNECTION_REQUEST_ACCEPTED); //#ifdef __USE_IO_COMPLETION_PORTS // bitStream.Write((unsigned short)myPlayerId.port + ( unsigned short ) index + ( unsigned short ) 1); @@ -2596,6 +2596,7 @@ void RakPeer::OnConnectionRequest( RakPeer::RemoteSystemStruct *remoteSystem, un bitStream.Write(remoteSystem->playerId.port); bitStream.Write(( PlayerIndex ) GetIndexFromPlayerID( remoteSystem->playerId, true )); + bitStream.Write((unsigned int)0); SendImmediate((char*)bitStream.GetData(), bitStream.GetNumberOfBitsUsed(), SYSTEM_PRIORITY, RELIABLE, 0, remoteSystem->playerId, false, false, RakNet::GetTime());