Browse Source

engine: client: move main client cvars to static allocation

pull/2/head
Alibek Omarov 2 years ago
parent
commit
b1d60c248d
  1. 12
      engine/client/cl_efx.c
  2. 2
      engine/client/cl_events.c
  3. 10
      engine/client/cl_frame.c
  4. 16
      engine/client/cl_game.c
  5. 223
      engine/client/cl_main.c
  6. 2
      engine/client/cl_mobile.c
  7. 8
      engine/client/cl_netgraph.c
  8. 4
      engine/client/cl_parse.c
  9. 26
      engine/client/cl_pmove.c
  10. 2
      engine/client/cl_scrn.c
  11. 4
      engine/client/cl_view.c
  12. 58
      engine/client/client.h
  13. 6
      engine/client/console.c
  14. 2
      engine/client/keys.c
  15. 2
      engine/platform/sdl/events.c

12
engine/client/cl_efx.c

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
#include "r_efx.h"
#include "cl_tent.h"
#include "pm_local.h"
#define PART_SIZE Q_max( 0.5f, cl_draw_particles->value )
#define PART_SIZE Q_max( 0.5f, cl_draw_particles.value )
/*
==============================================================
@ -171,7 +171,7 @@ particle_t * GAME_EXPORT R_AllocParticle( void (*callback)( particle_t*, float ) @@ -171,7 +171,7 @@ particle_t * GAME_EXPORT R_AllocParticle( void (*callback)( particle_t*, float )
{
particle_t *p;
if( !cl_draw_particles->value )
if( !cl_draw_particles.value )
return NULL;
// never alloc particles when we not in game
@ -222,7 +222,7 @@ particle_t *R_AllocTracer( const vec3_t org, const vec3_t vel, float life ) @@ -222,7 +222,7 @@ particle_t *R_AllocTracer( const vec3_t org, const vec3_t vel, float life )
{
particle_t *p;
if( !cl_draw_tracers->value )
if( !cl_draw_tracers.value )
return NULL;
// never alloc particles when we not in game
@ -2067,16 +2067,16 @@ void CL_FreeDeadBeams( void ) @@ -2067,16 +2067,16 @@ void CL_FreeDeadBeams( void )
void CL_DrawEFX( float time, qboolean fTrans )
{
CL_FreeDeadBeams();
if( CVAR_TO_BOOL( cl_draw_beams ))
if( cl_draw_beams.value )
ref.dllFuncs.CL_DrawBeams( fTrans, cl_active_beams );
if( fTrans )
{
R_FreeDeadParticles( &cl_active_particles );
if( CVAR_TO_BOOL( cl_draw_particles ))
if( cl_draw_particles.value )
ref.dllFuncs.CL_DrawParticles( time, cl_active_particles, PART_SIZE );
R_FreeDeadParticles( &cl_active_tracers );
if( CVAR_TO_BOOL( cl_draw_tracers ))
if( cl_draw_tracers.value )
ref.dllFuncs.CL_DrawTracers( time, cl_active_tracers );
}
}

2
engine/client/cl_events.c

@ -84,7 +84,7 @@ void CL_DescribeEvent( event_info_t *ei, int slot ) @@ -84,7 +84,7 @@ void CL_DescribeEvent( event_info_t *ei, int slot )
con_nprint_t info;
string origin_str = { 0 }; //, angles_str = { 0 };
if( !cl_showevents->value )
if( !cl_showevents.value )
return;
info.time_to_live = 1.0f;

10
engine/client/cl_frame.c

@ -134,7 +134,7 @@ some ents will be ignore lerping @@ -134,7 +134,7 @@ some ents will be ignore lerping
*/
qboolean CL_EntityIgnoreLerp( cl_entity_t *e )
{
if( cl_nointerp->value > 0.f )
if( cl_nointerp.value > 0.f )
return true;
if( e->model && e->model->type == mod_alias )
@ -464,13 +464,13 @@ int CL_InterpolateModel( cl_entity_t *e ) @@ -464,13 +464,13 @@ int CL_InterpolateModel( cl_entity_t *e )
if( cl.maxclients <= 1 )
return 1;
if( e->model->type == mod_brush && !cl_bmodelinterp->value )
if( e->model->type == mod_brush && !cl_bmodelinterp.value )
return 1;
if( cl.local.moving && cl.local.onground == e->index )
return 1;
t = cl.time - cl_interp->value;
t = cl.time - cl_interp.value;
CL_FindInterpolationUpdates( e, t, &ph0, &ph1 );
if( ph0 == NULL || ph1 == NULL )
@ -537,7 +537,7 @@ void CL_ComputePlayerOrigin( cl_entity_t *ent ) @@ -537,7 +537,7 @@ void CL_ComputePlayerOrigin( cl_entity_t *ent )
if( !ent->player )
return;
if( cl_nointerp->value > 0.f )
if( cl_nointerp.value > 0.f )
{
VectorCopy( ent->curstate.angles, ent->angles );
VectorCopy( ent->curstate.origin, ent->origin );
@ -555,7 +555,7 @@ void CL_ComputePlayerOrigin( cl_entity_t *ent ) @@ -555,7 +555,7 @@ void CL_ComputePlayerOrigin( cl_entity_t *ent )
return;
}
targettime = cl.time - cl_interp->value;
targettime = cl.time - cl_interp.value;
CL_PureOrigin( ent, targettime, origin, angles );
VectorCopy( angles, ent->angles );

16
engine/client/cl_game.c

@ -914,7 +914,7 @@ void CL_DrawCrosshair( void ) @@ -914,7 +914,7 @@ void CL_DrawCrosshair( void )
int x, y, width, height;
float xscale, yscale;
if( !clgame.ds.pCrosshair || !cl_crosshair->value )
if( !clgame.ds.pCrosshair || !cl_crosshair.value )
return;
// any camera on or client is died
@ -1630,14 +1630,14 @@ get actual screen info @@ -1630,14 +1630,14 @@ get actual screen info
*/
int GAME_EXPORT CL_GetScreenInfo( SCREENINFO *pscrinfo )
{
float scale_factor = hud_scale->value;
float scale_factor = hud_scale.value;
if( FBitSet( hud_fontscale->flags, FCVAR_CHANGED ))
if( FBitSet( hud_fontscale.flags, FCVAR_CHANGED ))
{
CL_FreeFont( &cls.creditsFont );
SCR_LoadCreditsFont();
ClearBits( hud_fontscale->flags, FCVAR_CHANGED );
ClearBits( hud_fontscale.flags, FCVAR_CHANGED );
}
// setup screen info
@ -1889,7 +1889,7 @@ static int GAME_EXPORT pfnDrawCharacter( int x, int y, int number, int r, int g, @@ -1889,7 +1889,7 @@ static int GAME_EXPORT pfnDrawCharacter( int x, int y, int number, int r, int g,
rgba_t color = { r, g, b, 255 };
int flags = FONT_DRAW_HUD;
if( hud_utf8->value )
if( hud_utf8.value )
flags |= FONT_DRAW_UTF8;
return CL_DrawCharacter( x, y, number, color, &cls.creditsFont, flags );
@ -2888,7 +2888,7 @@ static int GAME_EXPORT pfnDrawString( int x, int y, const char *str, int r, int @@ -2888,7 +2888,7 @@ static int GAME_EXPORT pfnDrawString( int x, int y, const char *str, int r, int
rgba_t color = { r, g, b, 255 };
int flags = FONT_DRAW_HUD | FONT_DRAW_NOLF;
if( hud_utf8->value )
if( hud_utf8.value )
SetBits( flags, FONT_DRAW_UTF8 );
return CL_DrawString( x, y, str, color, &cls.creditsFont, flags );
@ -2906,7 +2906,7 @@ static int GAME_EXPORT pfnDrawStringReverse( int x, int y, const char *str, int @@ -2906,7 +2906,7 @@ static int GAME_EXPORT pfnDrawStringReverse( int x, int y, const char *str, int
int flags = FONT_DRAW_HUD | FONT_DRAW_NOLF;
int width;
if( hud_utf8->value )
if( hud_utf8.value )
SetBits( flags, FONT_DRAW_UTF8 );
CL_DrawStringLen( &cls.creditsFont, str, &width, NULL, flags );
@ -3296,7 +3296,7 @@ static void GAME_EXPORT NetAPI_Status( net_status_t *status ) @@ -3296,7 +3296,7 @@ static void GAME_EXPORT NetAPI_Status( net_status_t *status )
status->remote_address = cls.netchan.remote_address;
status->packet_loss = packet_loss;
status->local_address = net_local;
status->rate = rate->value;
status->rate = rate.value;
}
/*

223
engine/client/cl_main.c

@ -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( "\nServer 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 ))

2
engine/client/cl_mobile.c

@ -67,7 +67,7 @@ static int pfnDrawScaledCharacter( int x, int y, int number, int r, int g, int b @@ -67,7 +67,7 @@ static int pfnDrawScaledCharacter( int x, int y, int number, int r, int g, int b
rgba_t color = { r, g, b, 255 };
int flags = FONT_DRAW_HUD;
if( hud_utf8->value )
if( hud_utf8.value )
SetBits( flags, FONT_DRAW_UTF8 );
if( fabs( g_font_scale - scale ) > 0.1f ||

8
engine/client/cl_netgraph.c

@ -376,8 +376,8 @@ static void NetGraph_DrawTextFields( int x, int y, int w, wrect_t rect, int coun @@ -376,8 +376,8 @@ static void NetGraph_DrawTextFields( int x, int y, int w, wrect_t rect, int coun
{
avg = avg / (float)( count - ( host.frametime * FRAMERATE_AVG_FRAC ));
if( cl_updaterate->value > 0.0f )
avg -= 1000.0f / cl_updaterate->value;
if( cl_updaterate.value > 0.0f )
avg -= 1000.0f / cl_updaterate.value;
// can't be below zero
avg = Q_max( 0.0f, avg );
@ -422,9 +422,9 @@ static void NetGraph_DrawTextFields( int x, int y, int w, wrect_t rect, int coun @@ -422,9 +422,9 @@ static void NetGraph_DrawTextFields( int x, int y, int w, wrect_t rect, int coun
}
if( graphtype < 3 )
CL_DrawStringf( font, ptx, pty, colors, FONT_DRAW_NORENDERMODE, "%i/s", (int)cl_cmdrate->value );
CL_DrawStringf( font, ptx, pty, colors, FONT_DRAW_NORENDERMODE, "%i/s", (int)cl_cmdrate.value );
CL_DrawStringf( font, ptx, last_y, colors, FONT_DRAW_NORENDERMODE, "%i/s" , (int)cl_updaterate->value );
CL_DrawStringf( font, ptx, last_y, colors, FONT_DRAW_NORENDERMODE, "%i/s" , (int)cl_updaterate.value );
}
/*

4
engine/client/cl_parse.c

@ -196,7 +196,7 @@ void CL_ParseServerTime( sizebuf_t *msg ) @@ -196,7 +196,7 @@ void CL_ParseServerTime( sizebuf_t *msg )
dt = cl.time - cl.mtime[0];
if( fabs( dt ) > cl_clockreset->value ) // 0.1 by default
if( fabs( dt ) > cl_clockreset.value ) // 0.1 by default
{
cl.time = cl.mtime[0];
cl.timedelta = 0.0f;
@ -2153,7 +2153,7 @@ void CL_ParseUserMessage( sizebuf_t *msg, int svc_num ) @@ -2153,7 +2153,7 @@ void CL_ParseUserMessage( sizebuf_t *msg, int svc_num )
// parse user message into buffer
MSG_ReadBytes( msg, pbuf, iSize );
if( cl_trace_messages->value )
if( cl_trace_messages.value )
{
Con_Reportf( "^3USERMSG %s SIZE %i SVC_NUM %i\n",
clgame.msg[i].name, iSize, clgame.msg[i].number );

26
engine/client/cl_pmove.c

@ -86,7 +86,7 @@ CL_IsPredicted @@ -86,7 +86,7 @@ CL_IsPredicted
*/
qboolean CL_IsPredicted( void )
{
if( cl_nopred->value || cl.intermission )
if( cl_nopred.value || cl.intermission )
return false;
// never predict the quake demos
@ -183,7 +183,7 @@ void CL_SetIdealPitch( void ) @@ -183,7 +183,7 @@ void CL_SetIdealPitch( void )
}
if( steps < 2 ) return;
cl.local.idealpitch = -dir * cl_idealpitchscale->value;
cl.local.idealpitch = -dir * cl_idealpitchscale.value;
}
/*
@ -234,7 +234,7 @@ void CL_CheckPredictionError( void ) @@ -234,7 +234,7 @@ void CL_CheckPredictionError( void )
// save the prediction error for interpolation
if( dist > MAX_PREDICTION_ERROR )
{
if( cl_showerror->value && host_developer.value )
if( cl_showerror.value && host_developer.value )
Con_NPrintf( 10 + ( ++pos & 3 ), "^3player teleported:^7 %.3f units\n", dist );
// a teleport or something or gamepaused
@ -242,7 +242,7 @@ void CL_CheckPredictionError( void ) @@ -242,7 +242,7 @@ void CL_CheckPredictionError( void )
}
else
{
if( cl_showerror->value && dist > MIN_PREDICTION_EPSILON && host_developer.value )
if( cl_showerror.value && dist > MIN_PREDICTION_EPSILON && host_developer.value )
Con_NPrintf( 10 + ( ++pos & 3 ), "^1prediction error:^7 %.3f units\n", dist );
VectorCopy( cl.frames[cmd].playerstate[cl.playernum].origin, cl.local.predicted_origins[frame] );
@ -253,7 +253,7 @@ void CL_CheckPredictionError( void ) @@ -253,7 +253,7 @@ void CL_CheckPredictionError( void )
// GoldSrc checks for singleplayer
// we would check for local server
if( dist > MIN_CORRECTION_DISTANCE && !SV_Active() )
cls.correction_time = cl_smoothtime->value;
cls.correction_time = cl_smoothtime.value;
}
}
@ -533,7 +533,7 @@ void GAME_EXPORT CL_SetSolidPlayers( int playernum ) @@ -533,7 +533,7 @@ void GAME_EXPORT CL_SetSolidPlayers( int playernum )
physent_t *pe;
int i;
if( !cl_solid_players->value )
if( !cl_solid_players.value )
return;
for( i = 0; i < MAX_CLIENTS; i++ )
@ -1105,7 +1105,7 @@ void CL_PredictMovement( qboolean repredicting ) @@ -1105,7 +1105,7 @@ void CL_PredictMovement( qboolean repredicting )
cl.local.onground = frame->playerstate[cl.playernum].onground;
else cl.local.onground = -1;
if( !repredicting || !CVAR_TO_BOOL( cl_lw ))
if( !repredicting || !cl_lw.value )
cl.local.viewmodel = to->client.viewmodel;
cl.local.repredicting = false;
cl.local.moving = false;
@ -1137,7 +1137,7 @@ void CL_PredictMovement( qboolean repredicting ) @@ -1137,7 +1137,7 @@ void CL_PredictMovement( qboolean repredicting )
cl.local.waterlevel = to->client.waterlevel;
cl.local.usehull = to->playerstate.usehull;
if( !repredicting || !CVAR_TO_BOOL( cl_lw ))
if( !repredicting || !cl_lw.value )
cl.local.viewmodel = to->client.viewmodel;
if( FBitSet( to->client.flags, FL_ONGROUND ))
@ -1167,7 +1167,7 @@ void CL_PredictMovement( qboolean repredicting ) @@ -1167,7 +1167,7 @@ void CL_PredictMovement( qboolean repredicting )
cl.local.moving = false;
}
if( cls.correction_time > 0 && !cl_nosmooth->value && cl_smoothtime->value )
if( cls.correction_time > 0 && !cl_nosmooth.value && cl_smoothtime.value )
{
vec3_t delta;
float frac;
@ -1177,14 +1177,14 @@ void CL_PredictMovement( qboolean repredicting ) @@ -1177,14 +1177,14 @@ void CL_PredictMovement( qboolean repredicting )
cls.correction_time -= host.frametime;
// Make sure smoothtime is postive
if( cl_smoothtime->value <= 0.0f )
Cvar_DirectSet( cl_smoothtime, "0.1" );
if( cl_smoothtime.value <= 0.0f )
Cvar_DirectSet( &cl_smoothtime, "0.1" );
// Clamp from 0 to cl_smoothtime.value
cls.correction_time = bound( 0.0, cls.correction_time, cl_smoothtime->value );
cls.correction_time = bound( 0.0, cls.correction_time, cl_smoothtime.value );
// Compute backward interpolation fraction along full correction
frac = 1.0f - cls.correction_time / cl_smoothtime->value;
frac = 1.0f - cls.correction_time / cl_smoothtime.value;
// Determine how much error we still have to make up for
VectorSubtract( cl.simorg, cl.local.lastorigin, delta );

2
engine/client/cl_scrn.c

@ -558,7 +558,7 @@ void SCR_LoadCreditsFont( void ) @@ -558,7 +558,7 @@ void SCR_LoadCreditsFont( void )
{
cl_font_t *const font = &cls.creditsFont;
qboolean success = false;
float scale = hud_fontscale->value;
float scale = hud_fontscale.value;
dword crc = 0;
// replace default gfx.wad textures by current charset's font

4
engine/client/cl_view.c

@ -339,7 +339,7 @@ qboolean V_PreRender( void ) @@ -339,7 +339,7 @@ qboolean V_PreRender( void )
// if the screen is disabled (loading plaque is up)
if( cls.disable_screen )
{
if(( host.realtime - cls.disable_screen ) > cl_timeout->value )
if(( host.realtime - cls.disable_screen ) > cl_timeout.value )
{
Con_Reportf( "V_PreRender: loading plaque timed out\n" );
cls.disable_screen = 0.0f;
@ -368,7 +368,7 @@ void V_RenderView( void ) @@ -368,7 +368,7 @@ void V_RenderView( void )
ref_viewpass_t rvp;
int viewnum = 0;
if( !cl.video_prepped || ( !ui_renderworld->value && UI_IsVisible() && !cl.background ))
if( !cl.video_prepped || ( !ui_renderworld.value && UI_IsVisible() && !cl.background ))
return; // still loading
V_CalcViewRect (); // compute viewport rectangle

58
engine/client/client.h

@ -659,46 +659,46 @@ extern convar_t cl_logocolor; @@ -659,46 +659,46 @@ extern convar_t cl_logocolor;
extern convar_t cl_allow_download;
extern convar_t cl_allow_upload;
extern convar_t cl_download_ingame;
extern convar_t *cl_nopred;
extern convar_t *cl_timeout;
extern convar_t *cl_nodelta;
extern convar_t *cl_interp;
extern convar_t *cl_nointerp;
extern convar_t *cl_showerror;
extern convar_t *cl_nosmooth;
extern convar_t *cl_smoothtime;
extern convar_t *cl_crosshair;
extern convar_t cl_nopred;
extern convar_t cl_timeout;
extern convar_t cl_nodelta;
extern convar_t cl_interp;
extern convar_t cl_nointerp;
extern convar_t cl_showerror;
extern convar_t cl_nosmooth;
extern convar_t cl_smoothtime;
extern convar_t cl_crosshair;
extern convar_t *cl_testlights;
extern convar_t *cl_cmdrate;
extern convar_t *cl_updaterate;
extern convar_t *cl_solid_players;
extern convar_t *cl_idealpitchscale;
extern convar_t cl_cmdrate;
extern convar_t cl_updaterate;
extern convar_t cl_solid_players;
extern convar_t cl_idealpitchscale;
extern convar_t *cl_allow_levelshots;
extern convar_t *cl_lightstyle_lerping;
extern convar_t *cl_draw_particles;
extern convar_t *cl_draw_tracers;
extern convar_t cl_lightstyle_lerping;
extern convar_t cl_draw_particles;
extern convar_t cl_draw_tracers;
extern convar_t *cl_levelshot_name;
extern convar_t *cl_draw_beams;
extern convar_t *cl_clockreset;
extern convar_t *cl_fixtimerate;
extern convar_t *hud_fontscale;
extern convar_t *hud_scale;
extern convar_t cl_draw_beams;
extern convar_t cl_clockreset;
extern convar_t cl_fixtimerate;
extern convar_t hud_fontscale;
extern convar_t hud_scale;
extern convar_t r_showtextures;
extern convar_t *cl_bmodelinterp;
extern convar_t *cl_lw; // local weapons
extern convar_t *cl_charset;
extern convar_t *cl_trace_messages;
extern convar_t *hud_utf8;
extern convar_t *cl_showevents;
extern convar_t cl_bmodelinterp;
extern convar_t cl_lw; // local weapons
extern convar_t cl_charset;
extern convar_t cl_trace_messages;
extern convar_t hud_utf8;
extern convar_t cl_showevents;
extern convar_t *scr_centertime;
extern convar_t *scr_viewsize;
extern convar_t *scr_loading;
extern convar_t *v_dark; // start from dark
extern convar_t *net_graph;
extern convar_t *rate;
extern convar_t rate;
extern convar_t m_ignore;
extern convar_t r_showtree;
extern convar_t *ui_renderworld;
extern convar_t ui_renderworld;
//=============================================================================

6
engine/client/console.c

@ -2113,7 +2113,7 @@ void Con_RunConsole( void ) @@ -2113,7 +2113,7 @@ void Con_RunConsole( void )
if( FBitSet( con_charset->flags, FCVAR_CHANGED ) ||
FBitSet( con_fontscale->flags, FCVAR_CHANGED ) ||
FBitSet( con_fontnum->flags, FCVAR_CHANGED ) ||
FBitSet( cl_charset->flags, FCVAR_CHANGED ))
FBitSet( cl_charset.flags, FCVAR_CHANGED ))
{
// update codepage parameters
if( !Q_stricmp( con_charset->string, "cp1251" ))
@ -2132,13 +2132,13 @@ void Con_RunConsole( void ) @@ -2132,13 +2132,13 @@ void Con_RunConsole( void )
g_codepage = 1252;
}
g_utf8 = !Q_stricmp( cl_charset->string, "utf-8" );
g_utf8 = !Q_stricmp( cl_charset.string, "utf-8" );
Con_InvalidateFonts();
Con_LoadConchars();
ClearBits( con_charset->flags, FCVAR_CHANGED );
ClearBits( con_fontnum->flags, FCVAR_CHANGED );
ClearBits( con_fontscale->flags, FCVAR_CHANGED );
ClearBits( cl_charset->flags, FCVAR_CHANGED );
ClearBits( cl_charset.flags, FCVAR_CHANGED );
}
}

2
engine/client/keys.c

@ -1055,7 +1055,7 @@ static qboolean OSK_KeyEvent( int key, int down ) @@ -1055,7 +1055,7 @@ static qboolean OSK_KeyEvent( int key, int down )
break;
}
if( !Q_stricmp( cl_charset->string, "utf-8" ) )
if( !Q_stricmp( cl_charset.string, "utf-8" ) )
ch = (unsigned char)osk.curbutton.val;
else
ch = Con_UtfProcessCharForce( (unsigned char)osk.curbutton.val );

2
engine/platform/sdl/events.c

@ -346,7 +346,7 @@ static void SDLash_InputEvent( SDL_TextInputEvent input ) @@ -346,7 +346,7 @@ static void SDLash_InputEvent( SDL_TextInputEvent input )
{
int ch;
if( !Q_stricmp( cl_charset->string, "utf-8" ) )
if( !Q_stricmp( cl_charset.string, "utf-8" ) )
ch = (unsigned char)*text;
else
ch = Con_UtfProcessCharForce( (unsigned char)*text );

Loading…
Cancel
Save