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