2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-29 13:30:34 +01:00

engine: remove Netsplit_SendLong, as we're not planning to support old protocol on server side

This commit is contained in:
Alibek Omarov 2024-01-27 22:44:46 +03:00
parent 7bf9407177
commit c77f290bc6

View File

@ -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