]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/main.qh
Spectator list: fix compile
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qh
1 #pragma once
2
3 #include <common/constants.qh>
4 #include <common/weapons/all.qh>
5
6 // --------------------------------------------------------------------------
7 // MENU Functionality
8
9 // --------------------------------------------------------------------------
10 // Onslaught
11
12 // Map coordinate base calculations need these
13 vector mi_center;
14 vector mi_scale;
15 // Minimap
16 string minimapname;
17
18 // --------------------------------------------------------------------------
19 // General stuff
20
21 float postinit;
22 float gametype;
23
24 //float sorted_players;
25 //float sorted_teams;
26
27 // Defs
28 //.float ctf_state;
29 //.float health;
30
31 float FONT_USER = 8;
32
33
34 vector OFFSET_CURSOR = '0 0 0';
35 vector SIZE_CURSOR = '32 32 0';
36 void draw_cursor(vector pos, vector ofs, string img, vector col, float a);
37 void draw_cursor_normal(vector pos, vector col, float a);
38 void LoadMenuSkinValues();
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 IntrusiveList g_drawables;
89 STATIC_INIT(g_drawables) { g_drawables = IL_NEW(); }
90 .void(entity) draw2d;
91 IntrusiveList g_drawables_2d;
92 STATIC_INIT(g_drawables_2d) { g_drawables_2d = IL_NEW(); }
93 .void(entity) entremove;
94 float drawframetime;
95 vector view_origin, view_forward, view_right, view_up;
96
97 IntrusiveList g_radarlinks;
98 STATIC_INIT(g_radarlinks) { g_radarlinks = IL_NEW(); }
99 IntrusiveList g_radaricons;
100 STATIC_INIT(g_radaricons) { g_radaricons = IL_NEW(); }
101
102 bool button_zoom;
103 bool spectatorbutton_zoom;
104 bool button_attack2;
105
106 Weapon activeweapon;
107 Weapon switchingweapon;
108 Weapon switchweapon;
109 float current_viewzoom;
110 float zoomin_effect;
111 float warmup_stage;
112
113 void Fog_Force();
114
115 string _getcommandkey(string text, string command, bool forcename);
116 #define getcommandkey(cmd_name, command) _getcommandkey(cmd_name, command, false)
117 #define getcommandkey_forcename(cmd_name, command) _getcommandkey(cmd_name, command, true)
118
119 string vote_called_vote;
120 float ready_waiting;
121 float ready_waiting_for_me;
122 float vote_waiting;
123 float vote_waiting_for_me;
124
125 float current_zoomfraction;
126
127 float cs_project_is_b0rked;
128 float vid_width, vid_height, vid_pixelheight;
129
130 float camera_active;            // Demo camera is active if set to true
131 float chase_active_backup;
132 float camera_roll;
133 vector camera_direction;
134
135 void centerprint_hud(string strMessage);
136 void centerprint_kill(float id);
137 void centerprint_generic(float new_id, string strMessage, float duration, float countdown_num);
138
139 const float ALPHA_MIN_VISIBLE = 0.003;
140
141 float armorblockpercent;
142
143 //hooks
144 int calledhooks;
145 const int HOOK_START =    1;
146 const int HOOK_END =      2;
147
148 .float ping, ping_packetloss, ping_movementloss;
149
150 float g_trueaim_minrange;
151
152 float hud;
153 float view_quality;
154
155 int num_spectators;
156 const int MAX_SPECTATORS = 7;
157 int spectatorlist[MAX_SPECTATORS];
158
159 int framecount;
160 .float health;
161
162 float GetSpeedUnitFactor(int speed_unit);
163 string GetSpeedUnit(int speed_unit);