|
|
|
@ -1021,6 +1021,24 @@ void CL_SendConnectPacket( void )
@@ -1021,6 +1021,24 @@ void CL_SendConnectPacket( void )
|
|
|
|
|
|
|
|
|
|
memset( protinfo, 0, sizeof( protinfo )); |
|
|
|
|
|
|
|
|
|
if( adr.type == NA_LOOPBACK ) |
|
|
|
|
{ |
|
|
|
|
IN_LockInputDevices( false ); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
int input_devices; |
|
|
|
|
|
|
|
|
|
input_devices = IN_CollectInputDevices(); |
|
|
|
|
IN_LockInputDevices( true ); |
|
|
|
|
|
|
|
|
|
Info_SetValueForKey( protinfo, "d", va( "%d", input_devices ), sizeof( protinfo ) ); |
|
|
|
|
Info_SetValueForKey( protinfo, "v", XASH_VERSION, sizeof( protinfo ) ); |
|
|
|
|
Info_SetValueForKey( protinfo, "b", va( "%d", Q_buildnum() ), sizeof( protinfo ) ); |
|
|
|
|
Info_SetValueForKey( protinfo, "o", Q_buildos(), sizeof( protinfo ) ); |
|
|
|
|
Info_SetValueForKey( protinfo, "a", Q_buildarch(), sizeof( protinfo ) ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if( cls.legacymode ) |
|
|
|
|
{ |
|
|
|
|
// set related userinfo keys
|
|
|
|
@ -1032,13 +1050,7 @@ void CL_SendConnectPacket( void )
@@ -1032,13 +1050,7 @@ void CL_SendConnectPacket( void )
|
|
|
|
|
if( !*Info_ValueForKey( cls.userinfo,"cl_maxpayload") ) |
|
|
|
|
Info_SetValueForKey( cls.userinfo, "cl_maxpayload", "1000", sizeof( cls.userinfo ) ); |
|
|
|
|
|
|
|
|
|
/// TODO: add input devices list
|
|
|
|
|
//Info_SetValueForKey( protinfo, "d", va( "%d", input_devices ), sizeof( protinfo ) );
|
|
|
|
|
Info_SetValueForKey( protinfo, "v", XASH_VERSION, sizeof( protinfo ) ); |
|
|
|
|
Info_SetValueForKey( protinfo, "b", va( "%d", Q_buildnum() ), sizeof( protinfo ) ); |
|
|
|
|
Info_SetValueForKey( protinfo, "o", Q_buildos(), sizeof( protinfo ) ); |
|
|
|
|
Info_SetValueForKey( protinfo, "a", Q_buildarch(), sizeof( protinfo ) ); |
|
|
|
|
Info_SetValueForKey( protinfo, "i", ID_GetMD5(), sizeof( protinfo ) ); |
|
|
|
|
Info_SetValueForKey( protinfo, "i", key, sizeof( protinfo ) ); |
|
|
|
|
|
|
|
|
|
Netchan_OutOfBandPrint( NS_CLIENT, adr, "connect %i %i %i \"%s\" %d \"%s\"\n", |
|
|
|
|
PROTOCOL_LEGACY_VERSION, Q_atoi( qport ), cls.challenge, cls.userinfo, NET_LEGACY_EXT_SPLIT, protinfo ); |
|
|
|
@ -1062,7 +1074,6 @@ void CL_SendConnectPacket( void )
@@ -1062,7 +1074,6 @@ void CL_SendConnectPacket( void )
|
|
|
|
|
Con_Printf( "Trying to connect by modern protocol\n" ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cls.timestart = Sys_DoubleTime(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1487,6 +1498,8 @@ void CL_Disconnect( void )
@@ -1487,6 +1498,8 @@ void CL_Disconnect( void )
|
|
|
|
|
// clear the network channel, too.
|
|
|
|
|
Netchan_Clear( &cls.netchan ); |
|
|
|
|
|
|
|
|
|
IN_LockInputDevices( false ); // unlock input devices
|
|
|
|
|
|
|
|
|
|
cls.state = ca_disconnected; |
|
|
|
|
cls.set_lastdemo = false; |
|
|
|
|
cls.connect_retry = 0; |
|
|
|
|