dpsnprintf(cls.userinfo, sizeof(cls.userinfo), "\\name\\player\\team\\none\\topcolor\\0\\bottomcolor\\0\\rate\\10000\\msg\\1\\noaim\\1\\*ver\\dp");
Cvar_RegisterVariable(&cl_name);
- Cvar_RegisterAlias(&cl_name, "_cl_name");
+ Cvar_RegisterVirtual(&cl_name, "_cl_name");
Cvar_RegisterVariable(&cl_rate);
- Cvar_RegisterAlias(&cl_rate, "_cl_rate");
+ Cvar_RegisterVirtual(&cl_rate, "_cl_rate");
Cvar_RegisterVariable(&cl_rate_burstsize);
- Cvar_RegisterAlias(&cl_rate_burstsize, "_cl_rate_burstsize");
+ Cvar_RegisterVirtual(&cl_rate_burstsize, "_cl_rate_burstsize");
Cvar_RegisterVariable(&cl_pmodel);
- Cvar_RegisterAlias(&cl_pmodel, "_cl_pmodel");
+ Cvar_RegisterVirtual(&cl_pmodel, "_cl_pmodel");
Cvar_RegisterVariable(&cl_color);
Cvar_RegisterCallback(&cl_color, CL_Color_c);
Cvar_RegisterVariable(&cl_topcolor);
Cvar_RegisterVariable(&scr_stipple);
Cvar_RegisterVariable(&scr_refresh);
Cvar_RegisterVariable(&net_graph);
- Cvar_RegisterAlias(&net_graph, "shownetgraph");
+ Cvar_RegisterVirtual(&net_graph, "shownetgraph");
Cvar_RegisterVariable(&cl_demo_mousegrab);
Cvar_RegisterVariable(&timedemo_screenshotframelist);
Cvar_RegisterVariable(&vid_touchscreen_outlinealpha);
Cvar_RegisterVariable (®istered);
Cvar_RegisterVariable (&cmdline);
Cvar_RegisterVariable(&cl_playermodel);
- Cvar_RegisterAlias(&cl_playermodel, "_cl_playermodel");
+ Cvar_RegisterVirtual(&cl_playermodel, "_cl_playermodel");
Cvar_RegisterVariable(&cl_playerskin);
- Cvar_RegisterAlias(&cl_playerskin, "_cl_playerskin");
+ Cvar_RegisterVirtual(&cl_playerskin, "_cl_playerskin");
// reconstitute the command line for the cmdline externally visible cvar
n = 0;
variable->callback = callback;
}
-void Cvar_RegisterAlias(cvar_t *variable, const char *alias )
+void Cvar_RegisterVirtual(cvar_t *variable, const char *name )
{
cvar_state_t *cvars = &cvars_all;
cvar_hash_t *hash;
int hashindex;
- if(!*alias)
+ if(!*name)
{
- Con_Printf("Cvar_RegisterAlias: invalid alias name\n");
+ Con_Printf("Cvar_RegisterVirtual: invalid virtual cvar name\n");
return;
}
// check for overlap with a command
- if (Cmd_Exists(cmd_local, alias))
+ if (Cmd_Exists(cmd_local, name))
{
- Con_Printf("Cvar_RegisterAlias: %s is a command\n", alias);
+ Con_Printf("Cvar_RegisterVirtual: %s is a command\n", name);
return;
}
- if(Cvar_FindVar(&cvars_all, alias, 0))
+ if(Cvar_FindVar(&cvars_all, name, 0))
{
- Con_Printf("Cvar_RegisterAlias: %s is a cvar\n", alias);
+ Con_Printf("Cvar_RegisterVirtual: %s is a cvar\n", name);
return;
}
variable->aliases[variable->aliases_size + 1] = NULL;
// Add to it
- variable->aliases[variable->aliases_size] = (char *)Z_Malloc(strlen(alias) + 1);
- memcpy(variable->aliases[variable->aliases_size], alias, strlen(alias) + 1);
+ variable->aliases[variable->aliases_size] = (char *)Z_Malloc(strlen(name) + 1);
+ memcpy(variable->aliases[variable->aliases_size], name, strlen(name) + 1);
variable->aliases_size++;
// link to head of list in this hash table index
hash = (cvar_hash_t *)Z_Malloc(sizeof(cvar_hash_t));
- hashindex = CRC_Block((const unsigned char *)alias, strlen(alias)) % CVAR_HASHSIZE;
+ hashindex = CRC_Block((const unsigned char *)name, strlen(name)) % CVAR_HASHSIZE;
hash->next = cvars->hashtable[hashindex];
cvars->hashtable[hashindex] = hash;
hash->cvar = variable;
extern cvar_state_t cvars_all;
extern cvar_state_t cvars_null; // used by cmd_serverfromclient which intentionally has no cvars available
-void Cvar_RegisterAlias(cvar_t *variable, const char *alias );
+void Cvar_RegisterVirtual(cvar_t *variable, const char *name );
void Cvar_RegisterCallback(cvar_t *variable, void (*callback)(cvar_t *));
Cvar_RegisterVariable(&net_fakelag);
Cvar_RegisterVariable(&net_fakeloss_send);
Cvar_RegisterVariable(&net_fakeloss_receive);
- Cvar_RegisterAlias(&net_fakelag, "cl_netlocalping");
- Cvar_RegisterAlias(&net_fakeloss_send, "cl_netpacketloss_send");
- Cvar_RegisterAlias(&net_fakeloss_receive, "cl_netpacketloss_receive");
+ Cvar_RegisterVirtual(&net_fakelag, "cl_netlocalping");
+ Cvar_RegisterVirtual(&net_fakeloss_send, "cl_netpacketloss_send");
+ Cvar_RegisterVirtual(&net_fakeloss_receive, "cl_netpacketloss_receive");
Cvar_RegisterVariable(&hostname);
Cvar_RegisterVariable(&developer_networking);
Cvar_RegisterVariable(&cl_netport);
Cvar_RegisterVariable(&cl_showdate_format);
Cvar_RegisterVariable(&cl_showtex);
- Cvar_RegisterAlias(&cl_showfps, "showfps");
- Cvar_RegisterAlias(&cl_showsound, "showsound");
- Cvar_RegisterAlias(&cl_showblur, "showblur");
- Cvar_RegisterAlias(&cl_showspeed, "showspeed");
- Cvar_RegisterAlias(&cl_showtopspeed, "showtopspeed");
- Cvar_RegisterAlias(&cl_showtime, "showtime");
- Cvar_RegisterAlias(&cl_showtime_format, "showtime_format");
- Cvar_RegisterAlias(&cl_showdate, "showdate");
- Cvar_RegisterAlias(&cl_showdate_format, "showdate_format");
- Cvar_RegisterAlias(&cl_showtex, "showtex");
+ Cvar_RegisterVirtual(&cl_showfps, "showfps");
+ Cvar_RegisterVirtual(&cl_showsound, "showsound");
+ Cvar_RegisterVirtual(&cl_showblur, "showblur");
+ Cvar_RegisterVirtual(&cl_showspeed, "showspeed");
+ Cvar_RegisterVirtual(&cl_showtopspeed, "showtopspeed");
+ Cvar_RegisterVirtual(&cl_showtime, "showtime");
+ Cvar_RegisterVirtual(&cl_showtime_format, "showtime_format");
+ Cvar_RegisterVirtual(&cl_showdate, "showdate");
+ Cvar_RegisterVirtual(&cl_showdate_format, "showdate_format");
+ Cvar_RegisterVirtual(&cl_showtex, "showtex");
Cvar_RegisterVariable(&sbar_alpha_bg);
Cvar_RegisterVariable(&sbar_alpha_fg);
Cvar_RegisterVariable (&skill);
Cvar_RegisterVariable (&host_timescale);
Cvar_RegisterCallback (&host_timescale, Host_Timescale_c);
- Cvar_RegisterAlias (&host_timescale, "slowmo");
- Cvar_RegisterAlias (&host_timescale, "timescale");
+ Cvar_RegisterVirtual (&host_timescale, "slowmo");
+ Cvar_RegisterVirtual (&host_timescale, "timescale");
Cvar_RegisterVariable (&sv_accelerate);
Cvar_RegisterVariable (&sv_aim);
Cvar_RegisterVariable (&sv_airaccel_qw);
Cvar_RegisterVariable (&sv_protocolname);
Cvar_RegisterVariable (&sv_random_seed);
Cvar_RegisterVariable (&host_limitlocal);
- Cvar_RegisterAlias(&host_limitlocal, "sv_ratelimitlocalplayer");
+ Cvar_RegisterVirtual(&host_limitlocal, "sv_ratelimitlocalplayer");
Cvar_RegisterVariable (&sv_sound_land);
Cvar_RegisterVariable (&sv_sound_watersplash);
Cvar_RegisterVariable (&sv_stepheight);