From 038b2817c6cfeec16a0c856ffaaca21f2286b02f Mon Sep 17 00:00:00 2001 From: Glenn Fiedler Date: Wed, 18 Sep 2024 15:31:50 -0400 Subject: [PATCH] pretty sure I've found it --- netcode/netcode.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/netcode/netcode.c b/netcode/netcode.c index d3a7e0b0..f715ca7d 100755 --- a/netcode/netcode.c +++ b/netcode/netcode.c @@ -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; } @@ -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: @@ -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;