From c77f290bc65ecec771bab26ea2cbe2a54ff4eb05 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 27 Jan 2024 22:44:46 +0300 Subject: [PATCH] engine: remove Netsplit_SendLong, as we're not planning to support old protocol on server side --- engine/common/net_chan.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/engine/common/net_chan.c b/engine/common/net_chan.c index 0d4b0a6c..19a2ec4b 100644 --- a/engine/common/net_chan.c +++ b/engine/common/net_chan.c @@ -198,44 +198,6 @@ qboolean NetSplit_GetLong( netsplit_t *ns, netadr_t *from, byte *data, size_t *l return false; } -/* -====================== -NetSplit_SendLong - -Send parts that are less or equal maxpacket -====================== -*/ -static void NetSplit_SendLong( netsrc_t sock, size_t length, void *data, netadr_t to, unsigned int maxpacket, unsigned int id) -{ - netsplit_packet_t packet = {0}; - unsigned int part = maxpacket - NETSPLIT_HEADER_SIZE; - - packet.signature = LittleLong(0xFFFFFFFE); - packet.id = LittleLong(id); - packet.length = LittleLong(length); - packet.part = LittleLong(part); - packet.count = ( length - 1 ) / part + 1; - - //Con_Reportf( S_NOTE "NetSplit_SendLong: packet to %s, count %d, length %d\n", NET_AdrToString( to ), (int)packet.count, (int)packet.length ); - - while( packet.index < packet.count ) - { - unsigned int size = part; - - if( size > length ) - size = length; - - length -= size; - - memcpy( packet.data, (const byte*)data + packet.index * part, size ); - //Con_Reportf( S_NOTE "NetSplit_SendLong: packet to %s, id %d, index %d\n", NET_AdrToString( to ), (int)packet.id, (int)packet.index ); - - NET_SendPacket( sock, size + NETSPLIT_HEADER_SIZE, &packet, to ); - packet.index++; - } - -} - /* =============== Netchan_Init