summaryrefslogtreecommitdiff
path: root/src/qcommon/q_shared.h
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2009-11-16 00:23:28 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:17:20 +0000
commit21674b587ca1aa1e956b66ae6e613d5afb2111d3 (patch)
treeef74238d6371114ac0f773eacd209f728225ffb9 /src/qcommon/q_shared.h
parentd22e46c9afdaf65a06ed0836d4f7e2b9e689e4d9 (diff)
* Merge ioq3-r1752
Diffstat (limited to 'src/qcommon/q_shared.h')
-rw-r--r--src/qcommon/q_shared.h55
1 files changed, 31 insertions, 24 deletions
diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h
index 29cc4b9b..186bb461 100644
--- a/src/qcommon/q_shared.h
+++ b/src/qcommon/q_shared.h
@@ -863,30 +863,33 @@ default values.
==========================================================
*/
-#define CVAR_ARCHIVE 1 // set to cause it to be saved to vars.rc
- // used for system variables, not for player
- // specific configurations
-#define CVAR_USERINFO 2 // sent to server on connect or change
-#define CVAR_SERVERINFO 4 // sent in response to front end requests
-#define CVAR_SYSTEMINFO 8 // these cvars will be duplicated on all clients
-#define CVAR_INIT 16 // don't allow change from console at all,
- // but can be set from the command line
-#define CVAR_LATCH 32 // will only change when C code next does
- // a Cvar_Get(), so it can't be changed
- // without proper initialization. modified
- // will be set, even though the value hasn't
- // changed yet
-#define CVAR_ROM 64 // display only, cannot be set by user at all
-#define CVAR_USER_CREATED 128 // created by a set command
-#define CVAR_TEMP 256 // can be set even when cheats are disabled, but is not archived
-#define CVAR_CHEAT 512 // can not be changed if cheats are disabled
-#define CVAR_NORESTART 1024 // do not clear when a cvar_restart is issued
-
-#define CVAR_SERVER_CREATED 2048 // cvar was created by a server the client connected to.
+#define CVAR_ARCHIVE 0x0001 // set to cause it to be saved to vars.rc
+ // used for system variables, not for player
+ // specific configurations
+#define CVAR_USERINFO 0x0002 // sent to server on connect or change
+#define CVAR_SERVERINFO 0x0004 // sent in response to front end requests
+#define CVAR_SYSTEMINFO 0x0008 // these cvars will be duplicated on all clients
+#define CVAR_INIT 0x0010 // don't allow change from console at all,
+ // but can be set from the command line
+#define CVAR_LATCH 0x0020 // will only change when C code next does
+ // a Cvar_Get(), so it can't be changed
+ // without proper initialization. modified
+ // will be set, even though the value hasn't
+ // changed yet
+#define CVAR_ROM 0x0040 // display only, cannot be set by user at all
+#define CVAR_USER_CREATED 0x0080 // created by a set command
+#define CVAR_TEMP 0x0100 // can be set even when cheats are disabled, but is not archived
+#define CVAR_CHEAT 0x0200 // can not be changed if cheats are disabled
+#define CVAR_NORESTART 0x0400 // do not clear when a cvar_restart is issued
+
+#define CVAR_SERVER_CREATED 0x0800 // cvar was created by a server the client connected to.
+#define CVAR_VM_CREATED 0x1000 // cvar was created exclusively in one of the VMs.
#define CVAR_NONEXISTENT 0xFFFFFFFF // Cvar doesn't exist.
// nothing outside the Cvar_*() functions should modify these fields!
-typedef struct cvar_s {
+typedef struct cvar_s cvar_t;
+
+struct cvar_s {
char *name;
char *string;
char *resetString; // cvar_restart will reset to this value
@@ -900,9 +903,13 @@ typedef struct cvar_s {
qboolean integral;
float min;
float max;
- struct cvar_s *next;
- struct cvar_s *hashNext;
-} cvar_t;
+
+ cvar_t *next;
+ cvar_t *prev;
+ cvar_t *hashNext;
+ cvar_t *hashPrev;
+ int hashIndex;
+};
#define MAX_CVAR_VALUE_STRING 256