/*
Copyright (C) 1996-1997 Id Software, Inc.
+Copyright (C) 2006-2021 DarkPlaces contributors
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
const char *defstring;
void (*callback)(struct cvar_s *var);
- qbool ignore_callback;
char **aliases;
- int aliasindex;
-
- // values at init (for Cvar_RestoreInitState)
- qbool initstate; // indicates this existed at init
- int initflags;
- const char *initstring;
- const char *initdescription;
- int initinteger;
- float initvalue;
- float initvector[3];
- const char *initdefstring;
+ int aliases_size;
+
+ struct cvar_s *initstate; // snapshot of cvar during init
int globaldefindex[3];
int globaldefindex_stringno[3];
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 *));
qbool Cvar_Readonly (cvar_t *var, const char *cmd_name);
+void Cvar_Callback(cvar_t *var);
+
/// equivelant to "<name> <variable>" typed at the console
void Cvar_Set (cvar_state_t *cvars, const char *var_name, const char *value);
-void Cvar_Set_NoCallback (cvar_t *var, const char *value);
/// expands value to a string and calls Cvar_Set
void Cvar_SetValue (cvar_state_t *cvars, const char *var_name, float value);