mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[raknet] Match RakPeer::Receive()
This commit is contained in:
parent
3fe35198d1
commit
c17f510bb7
@ -908,10 +908,14 @@ 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)))
|
||||
{
|
||||
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