Check cl_dlmax sizes on client

This commit is contained in:
mittorn
2019-01-30 13:38:32 +07:00
parent a97d8c119b
commit 097974bde2
2 changed files with 7 additions and 0 deletions

View File

@@ -1230,6 +1230,9 @@ qboolean NET_QueuePacket( netsrc_t sock, netadr_t *from, byte *data, size_t *len
// check for split message
if( sock == NS_CLIENT && *(int *)data == NET_HEADER_SPLITPACKET )
{
int splitsize = Cvar_VariableInteger("cl_dlmax");
if( splitsize < SPLITPACKET_MIN_SIZE || splitsize < SPLITPACKET_MAX_SIZE )
Cvar_SetValue( "cl_dlmax", MAX_ROUTEABLE_PACKET );
return NET_GetLong( data, ret, length, Cvar_VariableInteger("cl_dlmax") );
}
#endif