@ -42,49 +42,51 @@ CVAR_DEFINE_AUTO( cl_logofile, "lambda", FCVAR_ARCHIVE, "player logo name" );
@@ -42,49 +42,51 @@ CVAR_DEFINE_AUTO( cl_logofile, "lambda", FCVAR_ARCHIVE, "player logo name" );
CVAR_DEFINE_AUTO ( cl_logocolor , " orange " , FCVAR_ARCHIVE , " player logo color " ) ;
CVAR_DEFINE_AUTO ( cl_logoext , " bmp " , FCVAR_ARCHIVE , " temporary cvar to tell engine which logo must be packed " ) ;
CVAR_DEFINE_AUTO ( cl_test_bandwidth , " 1 " , FCVAR_ARCHIVE , " test network bandwith before connection " ) ;
convar_t * rcon_address ;
convar_t * cl_timeout ;
convar_t * cl_nopred ;
convar_t * cl_nodelta ;
convar_t * cl_crosshair ;
convar_t * cl_cmdbackup ;
convar_t * cl_showerror ;
convar_t * cl_bmodelinterp ;
convar_t * cl_draw_particles ;
convar_t * cl_draw_tracers ;
convar_t * cl_lightstyle_lerping ;
convar_t * cl_idealpitchscale ;
convar_t * cl_nosmooth ;
convar_t * cl_smoothtime ;
convar_t * cl_clockreset ;
convar_t * cl_fixtimerate ;
convar_t * hud_fontscale ;
convar_t * hud_scale ;
convar_t * cl_solid_players ;
convar_t * cl_draw_beams ;
convar_t * cl_updaterate ;
convar_t * cl_showevents ;
convar_t * cl_cmdrate ;
convar_t * cl_interp ;
convar_t * cl_nointerp ;
convar_t * cl_dlmax ;
convar_t * cl_upmax ;
convar_t * cl_lw ;
convar_t * cl_charset ;
convar_t * cl_trace_messages ;
convar_t * cl_nat ;
convar_t * hud_utf8 ;
convar_t * ui_renderworld ;
CVAR_DEFINE ( cl_draw_particles , " r_drawparticles " , " 1 " , FCVAR_CHEAT , " render particles " ) ;
CVAR_DEFINE ( cl_draw_tracers , " r_drawtracers " , " 1 " , FCVAR_CHEAT , " render tracers " ) ;
CVAR_DEFINE ( cl_draw_beams , " r_drawbeams " , " 1 " , FCVAR_CHEAT , " render beams " ) ;
static CVAR_DEFINE_AUTO ( rcon_address , " " , FCVAR_PRIVILEGED , " remote control address " ) ;
CVAR_DEFINE_AUTO ( cl_timeout , " 60 " , 0 , " connect timeout (in-seconds) " ) ;
CVAR_DEFINE_AUTO ( cl_nopred , " 0 " , FCVAR_ARCHIVE | FCVAR_USERINFO , " disable client movement prediction " ) ;
CVAR_DEFINE_AUTO ( cl_nodelta , " 0 " , 0 , " disable delta-compression for server messages " ) ;
CVAR_DEFINE ( cl_crosshair , " crosshair " , " 1 " , FCVAR_ARCHIVE , " show weapon chrosshair " ) ;
static CVAR_DEFINE_AUTO ( cl_cmdbackup , " 10 " , FCVAR_ARCHIVE , " how many additional history commands are sent " ) ;
CVAR_DEFINE_AUTO ( cl_showerror , " 0 " , FCVAR_ARCHIVE , " show prediction error " ) ;
CVAR_DEFINE_AUTO ( cl_bmodelinterp , " 1 " , FCVAR_ARCHIVE , " enable bmodel interpolation " ) ;
CVAR_DEFINE_AUTO ( cl_lightstyle_lerping , " 0 " , FCVAR_ARCHIVE , " enables animated light lerping (perfomance option) " ) ;
CVAR_DEFINE_AUTO ( cl_idealpitchscale , " 0.8 " , 0 , " how much to look up/down slopes and stairs when not using freelook " ) ;
CVAR_DEFINE_AUTO ( cl_nosmooth , " 0 " , FCVAR_ARCHIVE , " disable smooth up stair climbing " ) ;
CVAR_DEFINE_AUTO ( cl_smoothtime , " 0.1 " , FCVAR_ARCHIVE , " time to smooth up " ) ;
CVAR_DEFINE_AUTO ( cl_clockreset , " 0.1 " , FCVAR_ARCHIVE , " frametime delta maximum value before reset " ) ;
CVAR_DEFINE_AUTO ( cl_fixtimerate , " 7.5 " , FCVAR_ARCHIVE , " time in msec to client clock adjusting " ) ;
CVAR_DEFINE_AUTO ( hud_fontscale , " 1.0 " , FCVAR_ARCHIVE | FCVAR_LATCH , " scale hud font texture " ) ;
CVAR_DEFINE_AUTO ( hud_scale , " 0 " , FCVAR_ARCHIVE | FCVAR_LATCH , " scale hud at current resolution " ) ;
CVAR_DEFINE_AUTO ( cl_solid_players , " 1 " , 0 , " Make all players not solid (can't traceline them) " ) ;
CVAR_DEFINE_AUTO ( cl_updaterate , " 20 " , FCVAR_USERINFO | FCVAR_ARCHIVE , " refresh rate of server messages " ) ;
CVAR_DEFINE_AUTO ( cl_showevents , " 0 " , FCVAR_ARCHIVE , " show events playback " ) ;
CVAR_DEFINE_AUTO ( cl_cmdrate , " 60 " , FCVAR_ARCHIVE , " Max number of command packets sent to server per second " ) ;
CVAR_DEFINE ( cl_interp , " ex_interp " , " 0.1 " , FCVAR_ARCHIVE | FCVAR_FILTERABLE , " Interpolate object positions starting this many seconds in past " ) ;
CVAR_DEFINE_AUTO ( cl_nointerp , " 0 " , FCVAR_CLIENTDLL , " disable interpolation of entities and players " ) ;
static CVAR_DEFINE_AUTO ( cl_dlmax , " 0 " , FCVAR_USERINFO | FCVAR_ARCHIVE , " max allowed outcoming fragment size " ) ;
static CVAR_DEFINE_AUTO ( cl_upmax , " 1200 " , FCVAR_ARCHIVE , " max allowed incoming fragment size " ) ;
CVAR_DEFINE_AUTO ( cl_lw , " 1 " , FCVAR_ARCHIVE | FCVAR_USERINFO , " enable client weapon predicting " ) ;
CVAR_DEFINE_AUTO ( cl_charset , " utf-8 " , FCVAR_ARCHIVE , " 1-byte charset to use (iconv style) " ) ;
CVAR_DEFINE_AUTO ( cl_trace_messages , " 0 " , FCVAR_ARCHIVE | FCVAR_CHEAT , " enable message names tracing (good for developers) " ) ;
static CVAR_DEFINE_AUTO ( cl_nat , " 0 " , 0 , " show servers running under NAT " ) ;
CVAR_DEFINE_AUTO ( hud_utf8 , " 0 " , FCVAR_ARCHIVE , " Use utf-8 encoding for hud text " ) ;
CVAR_DEFINE_AUTO ( ui_renderworld , " 0 " , FCVAR_ARCHIVE , " render world when UI is visible " ) ;
//
// userinfo
//
convar_t * name ;
convar_t * model ;
convar_t * topcolor ;
convar_t * bottomcolor ;
convar_t * rate ;
static CVAR_DEFINE_AUTO ( name , " player " , FCVAR_USERINFO | FCVAR_ARCHIVE | FCVAR_PRINTABLEONLY , " player name " ) ;
static CVAR_DEFINE_AUTO ( model , " " , FCVAR_USERINFO | FCVAR_ARCHIVE , " player model ('player' is a singleplayer model) " ) ;
static CVAR_DEFINE_AUTO ( topcolor , " 0 " , FCVAR_USERINFO | FCVAR_ARCHIVE , " player top color " ) ;
static CVAR_DEFINE_AUTO ( bottomcolor , " 0 " , FCVAR_USERINFO | FCVAR_ARCHIVE , " player bottom color " ) ;
CVAR_DEFINE_AUTO ( rate , " 3500 " , FCVAR_USERINFO | FCVAR_ARCHIVE | FCVAR_FILTERABLE , " player network rate " ) ;
client_t cl ;
client_static_t cls ;
@ -203,7 +205,7 @@ int CL_GetFragmentSize( void *unused, fragsize_t mode )
@@ -203,7 +205,7 @@ int CL_GetFragmentSize( void *unused, fragsize_t mode )
if ( Netchan_IsLocal ( & cls . netchan ) )
return FRAGMENT_LOCAL_SIZE ;
return cl_upmax - > value ;
return cl_upmax . value ;
}
/*
@ -262,10 +264,10 @@ static float CL_LerpPoint( void )
@@ -262,10 +264,10 @@ static float CL_LerpPoint( void )
return 1.0f ;
}
if ( cl_interp - > value < = 0.001 )
if ( cl_interp . value < = 0.001 )
return 1.0f ;
frac = ( cl . time - cl . mtime [ 0 ] ) / cl_interp - > value ;
frac = ( cl . time - cl . mtime [ 0 ] ) / cl_interp . value ;
return frac ;
}
@ -312,13 +314,13 @@ void CL_ComputeClientInterpolationAmount( usercmd_t *cmd )
@@ -312,13 +314,13 @@ void CL_ComputeClientInterpolationAmount( usercmd_t *cmd )
float max_interp = MAX_EX_INTERP ;
float interpolation_time ;
if ( cl_updaterate - > value < MIN_UPDATERATE )
if ( cl_updaterate . value < MIN_UPDATERATE )
{
Con_Printf ( " cl_updaterate minimum is %f, resetting to default (20) \n " , MIN_UPDATERATE ) ;
Cvar_Reset ( " cl_updaterate " ) ;
}
if ( cl_updaterate - > value > MAX_UPDATERATE )
if ( cl_updaterate . value > MAX_UPDATERATE )
{
Con_Printf ( " cl_updaterate clamped at maximum (%f) \n " , MAX_UPDATERATE ) ;
Cvar_SetValue ( " cl_updaterate " , MAX_UPDATERATE ) ;
@ -327,15 +329,15 @@ void CL_ComputeClientInterpolationAmount( usercmd_t *cmd )
@@ -327,15 +329,15 @@ void CL_ComputeClientInterpolationAmount( usercmd_t *cmd )
if ( cls . spectator )
max_interp = 0.2f ;
min_interp = 1.0f / cl_updaterate - > value ;
interpolation_time = cl_interp - > value * 1000.0 ;
min_interp = 1.0f / cl_updaterate . value ;
interpolation_time = cl_interp . value * 1000.0 ;
if ( ( cl_interp - > value + epsilon ) < min_interp )
if ( ( cl_interp . value + epsilon ) < min_interp )
{
Con_Printf ( " ex_interp forced up to %.1f msec \n " , min_interp * 1000.f ) ;
Cvar_SetValue ( " ex_interp " , min_interp ) ;
}
else if ( ( cl_interp - > value - epsilon ) > max_interp )
else if ( ( cl_interp . value - epsilon ) > max_interp )
{
Con_Printf ( " ex_interp forced down to %.1f msec \n " , max_interp * 1000.f ) ;
Cvar_SetValue ( " ex_interp " , max_interp ) ;
@ -707,17 +709,17 @@ void CL_WritePacket( void )
@@ -707,17 +709,17 @@ void CL_WritePacket( void )
MSG_Init ( & buf , " ClientData " , data , sizeof ( data ) ) ;
// Determine number of backup commands to send along
numbackup = bound ( 0 , cl_cmdbackup - > value , cls . legacymode ? MAX_LEGACY_BACKUP_CMDS : MAX_BACKUP_COMMANDS ) ;
numbackup = bound ( 0 , cl_cmdbackup . value , cls . legacymode ? MAX_LEGACY_BACKUP_CMDS : MAX_BACKUP_COMMANDS ) ;
if ( cls . state = = ca_connected ) numbackup = 0 ;
// clamp cmdrate
if ( cl_cmdrate - > value < 10.0f )
if ( cl_cmdrate . value < 10.0f )
{
Cvar_SetValue ( " cl_cmdrate " , 10.0f ) ;
Cvar_DirectSet ( & cl_cmdrate , " 10 " ) ;
}
else if ( cl_cmdrate - > value > 100.0f )
else if ( cl_cmdrate . value > 100.0f )
{
Cvar_SetValue ( " cl_cmdrate " , 100.0f ) ;
Cvar_DirectSet ( & cl_cmdrate , " 100 " ) ;
}
// Check to see if we can actually send this command
@ -748,20 +750,20 @@ void CL_WritePacket( void )
@@ -748,20 +750,20 @@ void CL_WritePacket( void )
if ( ( host . realtime - cls . netchan . last_received ) > CONNECTION_PROBLEM_TIME )
{
Con_NPrintf ( 1 , " ^3Warning:^1 Connection Problem^7 \n " ) ;
Con_NPrintf ( 2 , " ^1Auto-disconnect in %.1f seconds^7 " , cl_timeout - > value - ( host . realtime - cls . netchan . last_received ) ) ;
Con_NPrintf ( 2 , " ^1Auto-disconnect in %.1f seconds^7 " , cl_timeout . value - ( host . realtime - cls . netchan . last_received ) ) ;
cl . validsequence = 0 ;
}
}
if ( cl_nodelta - > value )
if ( cl_nodelta . value )
cl . validsequence = 0 ;
if ( send_command )
{
int outgoing_sequence ;
if ( cl_cmdrate - > value > 0 ) // clamped between 10 and 100 fps
cls . nextcmdtime = host . realtime + bound ( 0.1f , ( 1.0f / cl_cmdrate - > value ) , 0.01f ) ;
if ( cl_cmdrate . value > 0 ) // clamped between 10 and 100 fps
cls . nextcmdtime = host . realtime + bound ( 0.1f , ( 1.0f / cl_cmdrate . value ) , 0.01f ) ;
else cls . nextcmdtime = host . realtime ; // always able to send right away
if ( cls . lastoutgoingcommand = = - 1 )
@ -1033,10 +1035,10 @@ void CL_SendConnectPacket( void )
@@ -1033,10 +1035,10 @@ void CL_SendConnectPacket( void )
if ( cls . legacymode )
{
// set related userinfo keys
if ( cl_dlmax - > value > = 40000 | | cl_dlmax - > value < 100 )
if ( cl_dlmax . value > = 40000 | | cl_dlmax . value < 100 )
Info_SetValueForKey ( cls . userinfo , " cl_maxpacket " , " 1400 " , sizeof ( cls . userinfo ) ) ;
else
Info_SetValueForKey ( cls . userinfo , " cl_maxpacket " , cl_dlmax - > string , sizeof ( cls . userinfo ) ) ;
Info_SetValueForKey ( cls . userinfo , " cl_maxpacket " , cl_dlmax . string , sizeof ( cls . userinfo ) ) ;
if ( ! * Info_ValueForKey ( cls . userinfo , " cl_maxpayload " ) )
Info_SetValueForKey ( cls . userinfo , " cl_maxpayload " , " 1000 " , sizeof ( cls . userinfo ) ) ;
@ -1051,7 +1053,7 @@ void CL_SendConnectPacket( void )
@@ -1051,7 +1053,7 @@ void CL_SendConnectPacket( void )
{
int extensions = NET_EXT_SPLITSIZE ;
if ( cl_dlmax - > value > FRAGMENT_MAX_SIZE | | cl_dlmax - > value < FRAGMENT_MIN_SIZE )
if ( cl_dlmax . value > FRAGMENT_MAX_SIZE | | cl_dlmax . value < FRAGMENT_MIN_SIZE )
Cvar_SetValue ( " cl_dlmax " , FRAGMENT_DEFAULT_SIZE ) ;
Info_RemoveKey ( cls . userinfo , " cl_maxpacket " ) ;
@ -1246,7 +1248,7 @@ void CL_Connect_f( void )
@@ -1246,7 +1248,7 @@ void CL_Connect_f( void )
// if running a local server, kill it and reissue
if ( SV_Active ( ) ) Host_ShutdownServer ( ) ;
NET_Config ( true , ! CVAR_TO_BOOL ( cl_nat ) ) ; // allow remote
NET_Config ( true , ! cl_nat . value ) ; // allow remote
Con_Printf ( " server %s \n " , server ) ;
CL_Disconnect ( ) ;
@ -1311,13 +1313,13 @@ void CL_Rcon_f( void )
@@ -1311,13 +1313,13 @@ void CL_Rcon_f( void )
}
else
{
if ( ! COM_CheckString ( rcon_address - > string ) )
if ( ! COM_CheckString ( rcon_address . string ) )
{
Con_Printf ( " You must either be connected or set the 'rcon_address' cvar to issue rcon commands \n " ) ;
return ;
}
NET_StringToAdr ( rcon_address - > string , & to ) ;
NET_StringToAdr ( rcon_address . string , & to ) ;
if ( to . port = = 0 ) to . port = MSG_BigShort ( PORT_SERVER ) ;
}
@ -1410,12 +1412,12 @@ int CL_GetSplitSize( void )
@@ -1410,12 +1412,12 @@ int CL_GetSplitSize( void )
if ( ! ( cls . extensions & NET_EXT_SPLITSIZE ) )
return 1400 ;
splitsize = cl_dlmax - > value ;
splitsize = cl_dlmax . value ;
if ( splitsize < FRAGMENT_MIN_SIZE | | splitsize > FRAGMENT_MAX_SIZE )
Cvar_SetValue ( " cl_dlmax " , FRAGMENT_DEFAULT_SIZE ) ;
return cl_dlmax - > value ;
return cl_dlmax . value ;
}
/*
@ -1439,7 +1441,7 @@ void CL_Reconnect( qboolean setup_netchan )
@@ -1439,7 +1441,7 @@ void CL_Reconnect( qboolean setup_netchan )
{
// only enable incoming split for legacy mode
cls . netchan . split = true ;
Con_Reportf ( " ^2NET_EXT_SPLIT enabled^7 (packet sizes is %d/%d) \n " , ( int ) cl_dlmax - > value , 65536 ) ;
Con_Reportf ( " ^2NET_EXT_SPLIT enabled^7 (packet sizes is %d/%d) \n " , ( int ) cl_dlmax . value , 65536 ) ;
}
}
else
@ -1448,7 +1450,7 @@ void CL_Reconnect( qboolean setup_netchan )
@@ -1448,7 +1450,7 @@ void CL_Reconnect( qboolean setup_netchan )
if ( cls . extensions & NET_EXT_SPLITSIZE )
{
Con_Reportf ( " ^2NET_EXT_SPLITSIZE enabled^7 (packet size is %d) \n " , ( int ) cl_dlmax - > value ) ;
Con_Reportf ( " ^2NET_EXT_SPLITSIZE enabled^7 (packet size is %d) \n " , ( int ) cl_dlmax . value ) ;
}
}
@ -1604,7 +1606,7 @@ void CL_InternetServers_f( void )
@@ -1604,7 +1606,7 @@ void CL_InternetServers_f( void )
{
char fullquery [ 512 ] ;
size_t len ;
qboolean nat = cl_nat - > value ! = 0.0f ;
qboolean nat = cl_nat . value ! = 0.0f ;
len = CL_BuildMasterServerScanRequest ( fullquery , sizeof ( fullquery ) , nat ) ;
@ -2365,7 +2367,7 @@ void CL_ReadPackets( void )
@@ -2365,7 +2367,7 @@ void CL_ReadPackets( void )
// check timeout
if ( cls . state > = ca_connected & & cls . state ! = ca_cinematic & & ! cls . demoplayback )
{
if ( host . realtime - cls . netchan . last_received > cl_timeout - > value )
if ( host . realtime - cls . netchan . last_received > cl_timeout . value )
{
Con_Printf ( " \n Server connection timed out. \n " ) ;
CL_Disconnect ( ) ;
@ -2859,55 +2861,56 @@ void CL_InitLocal( void )
@@ -2859,55 +2861,56 @@ void CL_InitLocal( void )
VGui_RegisterCvars ( ) ;
// register our variables
cl_crosshair = Cvar_Get ( " crosshair " , " 1 " , FCVAR_ARCHIVE , " show weapon chrosshair " ) ;
cl_nodelta = Cvar_Get ( " cl_nodelta " , " 0 " , 0 , " disable delta-compression for server messages " ) ;
cl_idealpitchscale = Cvar_Get ( " cl_idealpitchscale " , " 0.8 " , 0 , " how much to look up/down slopes and stairs when not using freelook " ) ;
cl_solid_players = Cvar_Get ( " cl_solid_players " , " 1 " , 0 , " Make all players not solid (can't traceline them) " ) ;
cl_interp = Cvar_Get ( " ex_interp " , " 0.1 " , FCVAR_ARCHIVE | FCVAR_FILTERABLE , " Interpolate object positions starting this many seconds in past " ) ;
cl_timeout = Cvar_Get ( " cl_timeout " , " 60 " , 0 , " connect timeout (in-seconds) " ) ;
cl_charset = Cvar_Get ( " cl_charset " , " utf-8 " , FCVAR_ARCHIVE , " 1-byte charset to use (iconv style) " ) ;
hud_utf8 = Cvar_Get ( " hud_utf8 " , " 0 " , FCVAR_ARCHIVE , " Use utf-8 encoding for hud text " ) ;
Cvar_RegisterVariable ( & cl_crosshair ) ;
Cvar_RegisterVariable ( & cl_nodelta ) ;
Cvar_RegisterVariable ( & cl_idealpitchscale ) ;
Cvar_RegisterVariable ( & cl_solid_players ) ;
Cvar_RegisterVariable ( & cl_interp ) ;
Cvar_RegisterVariable ( & cl_timeout ) ;
Cvar_RegisterVariable ( & cl_charset ) ;
Cvar_RegisterVariable ( & hud_utf8 ) ;
rcon_address = Cvar_Get ( " rcon_address " , " " , FCVAR_PRIVILEGED , " remote control address " ) ;
Cvar_RegisterVariable ( & rcon_address ) ;
cl_trace_messages = Cvar_Get ( " cl_trace_messages " , " 0 " , FCVAR_ARCHIVE | FCVAR_CHEAT , " enable message names tracing (good for developers) " ) ;
Cvar_RegisterVariable ( & cl_trace_messages ) ;
// userinfo
cl_nopred = Cvar_Get ( " cl_nopred " , " 0 " , FCVAR_ARCHIVE | FCVAR_USERINFO , " disable client movement prediction " ) ;
name = Cvar_Get ( " name " , Sys_GetCurrentUser ( ) , FCVAR_USERINFO | FCVAR_ARCHIVE | FCVAR_PRINTABLEONLY , " player name " ) ;
model = Cvar_Get ( " model " , " " , FCVAR_USERINFO | FCVAR_ARCHIVE , " player model ('player' is a singleplayer model) " ) ;
cl_updaterate = Cvar_Get ( " cl_updaterate " , " 20 " , FCVAR_USERINFO | FCVAR_ARCHIVE , " refresh rate of server messages " ) ;
cl_dlmax = Cvar_Get ( " cl_dlmax " , " 0 " , FCVAR_USERINFO | FCVAR_ARCHIVE , " max allowed outcoming fragment size " ) ;
cl_upmax = Cvar_Get ( " cl_upmax " , " 1200 " , FCVAR_ARCHIVE , " max allowed incoming fragment size " ) ;
cl_nat = Cvar_Get ( " cl_nat " , " 0 " , 0 , " show servers running under NAT " ) ;
rate = Cvar_Get ( " rate " , " 3500 " , FCVAR_USERINFO | FCVAR_ARCHIVE | FCVAR_FILTERABLE , " player network rate " ) ;
topcolor = Cvar_Get ( " topcolor " , " 0 " , FCVAR_USERINFO | FCVAR_ARCHIVE , " player top color " ) ;
bottomcolor = Cvar_Get ( " bottomcolor " , " 0 " , FCVAR_USERINFO | FCVAR_ARCHIVE , " player bottom color " ) ;
cl_lw = Cvar_Get ( " cl_lw " , " 1 " , FCVAR_ARCHIVE | FCVAR_USERINFO , " enable client weapon predicting " ) ;
Cvar_RegisterVariable ( & cl_nopred ) ;
Cvar_RegisterVariable ( & name ) ;
Cvar_DirectSet ( & name , Sys_GetCurrentUser ( ) ) ;
Cvar_RegisterVariable ( & model ) ;
Cvar_RegisterVariable ( & cl_updaterate ) ;
Cvar_RegisterVariable ( & cl_dlmax ) ;
Cvar_RegisterVariable ( & cl_upmax ) ;
Cvar_RegisterVariable ( & cl_nat ) ;
Cvar_RegisterVariable ( & rate ) ;
Cvar_RegisterVariable ( & topcolor ) ;
Cvar_RegisterVariable ( & bottomcolor ) ;
Cvar_RegisterVariable ( & cl_lw ) ;
Cvar_Get ( " cl_lc " , " 1 " , FCVAR_ARCHIVE | FCVAR_USERINFO , " enable lag compensation " ) ;
Cvar_Get ( " password " , " " , FCVAR_USERINFO , " server password " ) ;
Cvar_Get ( " team " , " " , FCVAR_USERINFO , " player team " ) ;
Cvar_Get ( " skin " , " " , FCVAR_USERINFO , " player skin " ) ;
cl_nosmooth = Cvar_Get ( " cl_nosmooth " , " 0 " , FCVAR_ARCHIVE , " disable smooth up stair climbing " ) ;
cl_nointerp = Cvar_Get ( " cl_nointerp " , " 0 " , FCVAR_CLIENTDLL , " disable interpolation of entities and players " ) ;
cl_smoothtime = Cvar_Get ( " cl_smoothtime " , " 0.1 " , FCVAR_ARCHIVE , " time to smooth up " ) ;
cl_cmdbackup = Cvar_Get ( " cl_cmdbackup " , " 10 " , FCVAR_ARCHIVE , " how many additional history commands are sent " ) ;
cl_cmdrate = Cvar_Get ( " cl_cmdrate " , " 60 " , FCVAR_ARCHIVE , " Max number of command packets sent to server per second " ) ;
cl_draw_particles = Cvar_Get ( " r_drawparticles " , " 1 " , FCVAR_CHEAT , " render particles " ) ;
cl_draw_tracers = Cvar_Get ( " r_drawtracers " , " 1 " , FCVAR_CHEAT , " render tracers " ) ;
cl_draw_beams = Cvar_Get ( " r_drawbeams " , " 1 " , FCVAR_CHEAT , " render beams " ) ;
cl_lightstyle_lerping = Cvar_Get ( " cl_lightstyle_lerping " , " 0 " , FCVAR_ARCHIVE , " enables animated light lerping (perfomance option) " ) ;
cl_showerror = Cvar_Get ( " cl_showerror " , " 0 " , FCVAR_ARCHIVE , " show prediction error " ) ;
cl_bmodelinterp = Cvar_Get ( " cl_bmodelinterp " , " 1 " , FCVAR_ARCHIVE , " enable bmodel interpolation " ) ;
cl_clockreset = Cvar_Get ( " cl_clockreset " , " 0.1 " , FCVAR_ARCHIVE , " frametime delta maximum value before reset " ) ;
cl_fixtimerate = Cvar_Get ( " cl_fixtimerate " , " 7.5 " , FCVAR_ARCHIVE , " time in msec to client clock adjusting " ) ;
hud_fontscale = Cvar_Get ( " hud_fontscale " , " 1.0 " , FCVAR_ARCHIVE | FCVAR_LATCH , " scale hud font texture " ) ;
hud_scale = Cvar_Get ( " hud_scale " , " 0 " , FCVAR_ARCHIVE | FCVAR_LATCH , " scale hud at current resolution " ) ;
Cvar_RegisterVariable ( & cl_nosmooth ) ;
Cvar_RegisterVariable ( & cl_nointerp ) ;
Cvar_RegisterVariable ( & cl_smoothtime ) ;
Cvar_RegisterVariable ( & cl_cmdbackup ) ;
Cvar_RegisterVariable ( & cl_cmdrate ) ;
Cvar_RegisterVariable ( & cl_draw_particles ) ;
Cvar_RegisterVariable ( & cl_draw_tracers ) ;
Cvar_RegisterVariable ( & cl_draw_beams ) ;
Cvar_RegisterVariable ( & cl_lightstyle_lerping ) ;
Cvar_RegisterVariable ( & cl_showerror ) ;
Cvar_RegisterVariable ( & cl_bmodelinterp ) ;
Cvar_RegisterVariable ( & cl_clockreset ) ;
Cvar_RegisterVariable ( & cl_fixtimerate ) ;
Cvar_RegisterVariable ( & hud_fontscale ) ;
Cvar_RegisterVariable ( & hud_scale ) ;
Cvar_Get ( " cl_background " , " 0 " , FCVAR_READ_ONLY , " indicate what background map is running " ) ;
cl_showevents = Cvar_Get ( " cl_showevents " , " 0 " , FCVAR_ARCHIVE , " show events playback " ) ;
Cvar_RegisterVariable ( & cl_showevents ) ;
Cvar_Get ( " lastdemo " , " " , FCVAR_ARCHIVE , " last played demo " ) ;
ui_renderworld = Cvar_Get ( " ui_renderworld " , " 0 " , FCVAR_ARCHIVE , " render world when UI is visible " ) ;
Cvar_RegisterVariable ( & ui_renderworld ) ;
// these two added to shut up CS 1.5 about 'unknown' commands
Cvar_Get ( " lightgamma " , " 1 " , FCVAR_ARCHIVE , " ambient lighting level (legacy, unused) " ) ;
@ -2987,10 +2990,10 @@ to smooth lag effect
@@ -2987,10 +2990,10 @@ to smooth lag effect
*/
void CL_AdjustClock ( void )
{
if ( cl . timedelta = = 0.0f | | ! cl_fixtimerate - > value )
if ( cl . timedelta = = 0.0f | | ! cl_fixtimerate . value )
return ;
if ( cl_fixtimerate - > value < 0.0f )
if ( cl_fixtimerate . value < 0.0f )
Cvar_SetValue ( " cl_fixtimerate " , 7.5f ) ;
if ( fabs ( cl . timedelta ) > = 0.001f )
@ -3000,7 +3003,7 @@ void CL_AdjustClock( void )
@@ -3000,7 +3003,7 @@ void CL_AdjustClock( void )
msec = ( cl . timedelta * 1000.0 ) ;
sign = ( msec < 0 ) ? 1.0 : - 1.0 ;
msec = Q_min ( cl_fixtimerate - > value , fabs ( msec ) ) ;
msec = Q_min ( cl_fixtimerate . value , fabs ( msec ) ) ;
adjust = sign * ( msec / 1000.0 ) ;
if ( fabs ( adjust ) < fabs ( cl . timedelta ) )