mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[raknet] Match RakPeer::OnConnectionRequest(...)
This commit is contained in:
parent
98c0a1d2ef
commit
87bb74c55d
@ -2585,7 +2585,7 @@ void RakPeer::OnConnectionRequest( RakPeer::RemoteSystemStruct *remoteSystem, un
|
|||||||
}
|
}
|
||||||
#endif
|
#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);
|
bitStream.Write((unsigned char)ID_CONNECTION_REQUEST_ACCEPTED);
|
||||||
//#ifdef __USE_IO_COMPLETION_PORTS
|
//#ifdef __USE_IO_COMPLETION_PORTS
|
||||||
// bitStream.Write((unsigned short)myPlayerId.port + ( unsigned short ) index + ( unsigned short ) 1);
|
// 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(remoteSystem->playerId.port);
|
||||||
bitStream.Write(( PlayerIndex ) GetIndexFromPlayerID( remoteSystem->playerId, true ));
|
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());
|
SendImmediate((char*)bitStream.GetData(), bitStream.GetNumberOfBitsUsed(), SYSTEM_PRIORITY, RELIABLE, 0, remoteSystem->playerId, false, false, RakNet::GetTime());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user