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