mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-02-07 20:54:25 +00:00
Check cl_dlmax sizes on client
This commit is contained in:
parent
a97d8c119b
commit
097974bde2
@ -1044,9 +1044,13 @@ void CL_SendConnectPacket( void )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if( cl_dlmax->value > FRAGMENT_MAX_SIZE || cl_dlmax->value < FRAGMENT_MIN_SIZE )
|
||||||
|
Cvar_SetValue( "cl_dlmax", FRAGMENT_DEFAULT_SIZE );
|
||||||
|
|
||||||
// remove useless userinfo keys
|
// remove useless userinfo keys
|
||||||
Cvar_FullSet( "cl_maxpacket", "0", 0 );
|
Cvar_FullSet( "cl_maxpacket", "0", 0 );
|
||||||
Cvar_FullSet( "cl_maxpayload", "1000", 0 );
|
Cvar_FullSet( "cl_maxpayload", "1000", 0 );
|
||||||
|
|
||||||
Info_SetValueForKey( protinfo, "uuid", key, sizeof( protinfo ));
|
Info_SetValueForKey( protinfo, "uuid", key, sizeof( protinfo ));
|
||||||
Info_SetValueForKey( protinfo, "qport", qport, sizeof( protinfo ));
|
Info_SetValueForKey( protinfo, "qport", qport, sizeof( protinfo ));
|
||||||
Netchan_OutOfBandPrint( NS_CLIENT, adr, "connect %i %i \"%s\" \"%s\"\n", PROTOCOL_VERSION, cls.challenge, protinfo, cls.userinfo );
|
Netchan_OutOfBandPrint( NS_CLIENT, adr, "connect %i %i \"%s\" \"%s\"\n", PROTOCOL_VERSION, cls.challenge, protinfo, cls.userinfo );
|
||||||
|
@ -1230,6 +1230,9 @@ qboolean NET_QueuePacket( netsrc_t sock, netadr_t *from, byte *data, size_t *len
|
|||||||
// check for split message
|
// check for split message
|
||||||
if( sock == NS_CLIENT && *(int *)data == NET_HEADER_SPLITPACKET )
|
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") );
|
return NET_GetLong( data, ret, length, Cvar_VariableInteger("cl_dlmax") );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user