bd9ffe64c58967841650baf971d1ec65fbad948f
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qh
1 const string string_null;
2
3 // --------------------------------------------------------------------------
4 // MENU Functionality
5
6 #define DATABUF_PING 0
7 #define DATABUF_CAPTURES (1*maxclients)
8 #define DATABUF_DEATHS (2*maxclients)
9 #define DATABUF_RETURNS (3*maxclients)
10
11 #define DATABUF_NEXT (5*maxclients)
12
13 void() menu_show_error;
14 void() menu_sub_null;
15
16 float menu_visible;
17 var void() menu_show;
18 var float(float bInputType, float nPrimary, float nSecondary) menu_action;
19
20 // --------------------------------------------------------------------------
21 // Onslaught
22
23 // Map coordinate base calculations need these
24 vector mi_center;
25 vector mi_scale;
26 // Minimap
27 string minimapname;
28
29 // --------------------------------------------------------------------------
30 // General stuff
31
32 float drawfont;
33 float postinit;
34 float gametype;
35
36 //float sorted_players;
37 //float sorted_teams;
38
39 // Defs
40 //.float ctf_state;
41 //.float health;
42
43 // Constants
44 const float COLOR_TEAM_RED = 64;
45 const float COLOR_TEAM_BLUE = 208;
46
47 const float COLOR_TEAM1       = 4;  // red
48 const float COLOR_TEAM2       = 13; // blue
49 const float COLOR_TEAM3       = 12; // yellow
50 const float COLOR_TEAM4       = 9; // pink
51 const float COLOR_SPECTATOR = 1337;
52
53 #define FONT_DEFAULT 0
54 #define FONT_USER 8
55
56 // --------------------------------------------------------------------------
57 // Scoreboard stuff
58
59 #define MAX_HUD_FIELDS 16
60
61 #define SP_END -1
62
63 #define SP_PING -2
64 #define SP_NAME -3
65 #define SP_KDRATIO -4
66 #define SP_CLRATIO -5
67 #define SP_PL -6
68 #define SP_FRAGS -7
69
70 #define SP_SEPARATOR -100
71
72 float hud_field[MAX_HUD_FIELDS + 1];
73 float hud_size[MAX_HUD_FIELDS + 1];
74 string hud_title[MAX_HUD_FIELDS + 1];
75 float hud_num_fields;
76
77 string scores_label[MAX_SCORE];
78 float scores_flags[MAX_SCORE];
79 string teamscores_label[MAX_SCORE];
80 float teamscores_flags[MAX_SCORE];
81 .float scores[MAX_SCORE];
82 .float teamscores[MAX_TEAMSCORE];
83
84 #define IS_INCREASING(x) ( (x)&SFL_LOWER_IS_BETTER )
85 #define IS_DECREASING(x) ( !((x)&SFL_LOWER_IS_BETTER) )
86
87
88 vector hud_fontsize;
89
90 float RANKINGS_RECEIVED_CNT;
91 string grecordholder[RANKINGS_CNT];
92 float grecordtime[RANKINGS_CNT];
93 //float csqc_flags;
94
95 entity playerslots[255]; // 255 is engine limit on maxclients
96 entity teamslots[17];    // 17 teams (including "spectator team")
97 .float gotscores;
98 .entity owner;
99 .float ready;
100
101 .void(void) draw;
102 .void(void) draw2d;
103 .void(void) entremove;
104 float drawframetime;
105 vector view_origin, view_angles, view_forward, view_right, view_up;
106
107 float button_zoom;
108 float spectatorbutton_zoom;
109 float button_attack2;
110
111 float activeweapon;
112 float switchingweapon;
113 float switchweapon;
114 float current_viewzoom;
115 float zoomin_effect;
116 float warmup_stage;
117
118 string getcommandkey(string text, string command);
119
120 string vote_called_vote;
121 float ready_waiting;
122 float ready_waiting_for_me;
123 float vote_waiting;
124 float vote_waiting_for_me;
125
126 float current_zoomfraction;
127
128 float cs_project_is_b0rked;
129 float vid_width, vid_height, vid_pixelheight;
130
131 float camera_active;            // Demo camera is active if set to TRUE
132 float chase_active_backup;
133 float camera_roll;
134 vector camera_direction;
135
136 void centerprint_hud(string strMessage);
137 void centerprint_generic(float new_id, string strMessage, float duration, float countdown_num);
138
139 #define ALPHA_MIN_VISIBLE 0.003
140
141 float armorblockpercent;
142 float g_weaponswitchdelay;
143
144 //hooks
145 float calledhooks;
146 #define HOOK_START    1
147 #define HOOK_END      2
148
149 .float ping, ping_packetloss, ping_movementloss;
150
151 float g_balance_grenadelauncher_bouncefactor;
152 float g_balance_grenadelauncher_bouncestop;
153 float g_balance_electro_secondary_bouncefactor;
154 float g_balance_electro_secondary_bouncestop;
155 float g_trueaim_minrange;
156
157 entity entcs_receiver[255]; // 255 is the engine limit on maxclients
158
159 float hud;
160 float view_quality;
161
162 void cvar_clientsettemp(string cv, string val);