Exemple #1
0
static void CPROC Received( PCLIENT pc, POINTER buffer, size_t size )
{
	struct network_read_state *pns = (struct network_read_state *)GetNetworkLong( pc, 0 );
	if( !buffer )
	{
		pns = New( struct network_read_state );
		MemSet( pns, 0, sizeof( struct network_read_state ) );
		SetNetworkLong( pc, 0, (uintptr_t)pns );
		pns->bufsize = 4096;
		pns->buffer = Allocate( 4096 );
	}
Exemple #2
0
PTRSZVAL OnOpen( PCLIENT pc, PTRSZVAL psv )
{
	struct game_client *client = New( struct game_client );
   SetNetworkLong( pc, 0, (PTRSZVAL)client );
}