forked from packetflinger/q2admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathg_checkvar.h
More file actions
33 lines (29 loc) · 1018 Bytes
/
g_checkvar.h
File metadata and controls
33 lines (29 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* Q2Admin
* Client variable checking stuff
*/
#pragma once
#define CHECKVARFILE "q2a_cvar.cfg"
#define CHECKVARCMD "[sv] !checkvarcmd [CT/RG] \"variable\" [\"value\" | \"lower\" \"upper\"]\n"
#define CHECKVARDELCMD "[sv] !checkvardel checkvarnum\n"
#define CHECKVAR_MAX 50
#define CV_CONSTANT 0
#define CV_RANGE 1
/**
* Variable properties
*/
typedef struct {
char variablename[50];
char value[50];
double upper, lower;
int type;
} checkvar_t;
void checkvarcmdRun(int startarg, edict_t *ent, int client);
void checkvarDelRun(int startarg, edict_t *ent, int client);
void checkVariableTest(edict_t *ent, int client, int idx);
void checkVariableValid(edict_t *ent, int client, char *value);
void displayNextCheckvar(edict_t *ent, int client, long checkvarcmd);
void listcheckvarsRun(int startarg, edict_t *ent, int client);
qboolean ReadCheckVarFile(char *checkvarname);
void readCheckVarLists(void);
void reloadCheckVarFileRun(int startarg, edict_t *ent, int client);