Skip to content

Commit

Permalink
pretty sure I've found it
Browse files Browse the repository at this point in the history
  • Loading branch information
gafferongames committed Sep 18, 2024
1 parent 5d2bc36 commit 038b281
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion netcode/netcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -4113,11 +4113,11 @@ struct netcode_server_t * netcode_server_create_overload( NETCODE_CONST char * s
memset( server->client_user_data, 0, sizeof( server->client_user_data ) );

memset( server->client_last_packet_send_time, 0, sizeof( server->client_last_packet_send_time ) );
memset( server->client_last_packet_receive_time, 0, sizeof( server->client_last_packet_receive_time ) );

int i;
for ( i = 0; i < NETCODE_MAX_CLIENTS; i++ )
{
server->client_last_packet_receive_time[i] = time;
server->client_encryption_index[i] = -1;
}

Expand Down Expand Up @@ -4669,6 +4669,9 @@ void netcode_server_process_packet_internal( struct netcode_server_t * server,

uint8_t packet_type = ( (uint8_t*) packet ) [0];

// todo
printf( "server process packet type %d\n", packet_type );

switch ( packet_type )
{
case NETCODE_CONNECTION_REQUEST_PACKET:
Expand Down Expand Up @@ -4705,6 +4708,11 @@ void netcode_server_process_packet_internal( struct netcode_server_t * server,
server->client_confirmed[client_index] = 1;
}
}
else
{
// todo
printf( "*** ignoring keep alive because client index is -1 ***\n" );
}
}
break;

Expand Down

0 comments on commit 038b281

Please sign in to comment.