mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-11-23 14:29:52 +00:00
[raknet] Match RakPeer::Receive()
This commit is contained in:
parent
3fe35198d1
commit
c17f510bb7
@ -909,9 +909,13 @@ Packet* RakPeer::Receive( void )
|
||||
Packet *packet = ReceiveIgnoreRPC();
|
||||
while (packet && (packet->data[ 0 ] == ID_RPC || (packet->length>sizeof(unsigned char)+sizeof(RakNetTime) && packet->data[0]==ID_TIMESTAMP && packet->data[sizeof(unsigned char)+sizeof(RakNetTime)]==ID_RPC)))
|
||||
{
|
||||
// Do RPC calls from the user thread, not the network update thread
|
||||
// If we are currently blocking on an RPC reply, send ID_RPC to the blocker to handle rather than handling RPCs automatically
|
||||
HandleRPCPacket( ( char* ) packet->data, packet->length, packet->playerId );
|
||||
if (packet->playerId != UNASSIGNED_PLAYER_ID)
|
||||
{
|
||||
// Do RPC calls from the user thread, not the network update thread
|
||||
// If we are currently blocking on an RPC reply, send ID_RPC to the blocker to handle rather than handling RPCs automatically
|
||||
HandleRPCPacket( ( char* ) packet->data, packet->length, packet->playerId );
|
||||
}
|
||||
|
||||
DeallocatePacket( packet );
|
||||
|
||||
packet = ReceiveIgnoreRPC();
|
||||
|
Loading…
Reference in New Issue
Block a user