]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/main.qh
Merge branch 'master' into Mario/hagar_notfixed
[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 void setpredraw(entity this, void(entity) pdfunc);
10
11 // --------------------------------------------------------------------------
12 // Onslaught
13
14 // Map coordinate base calculations need these
15 vector mi_center;
16 vector mi_scale;
17 // Minimap
18 string minimapname;
19
20 // --------------------------------------------------------------------------
21 // General stuff
22
23 float postinit;
24 float gametype;
25
26 //float sorted_players;
27 //float sorted_teams;
28
29 // Defs
30 //.float ctf_state;
31 //.float health;
32
33 float FONT_USER = 8;
34
35
36 vector OFFSET_CURSOR = '0 0 0';
37 vector SIZE_CURSOR = '32 32 0';
38 void draw_cursor(vector pos, vector ofs, string img, vector col, float a);
39 void draw_cursor_normal(vector pos, vector col, float a);
40 void LoadMenuSkinValues();
41
42 // --------------------------------------------------------------------------
43 // Scoreboard stuff
44
45 const int MAX_HUD_FIELDS = 16;
46
47 const int SP_END = -1;
48
49 const int SP_PING = -2;
50 const int SP_NAME = -3;
51 const int SP_KDRATIO = -4;
52 const int SP_CLRATIO = -5;
53 const int SP_PL = -6;
54 const int SP_FRAGS = -7;
55 const int SP_SUM = -8;
56
57 const int SP_SEPARATOR = -100;
58
59 float hud_field[MAX_HUD_FIELDS + 1];
60 float hud_size[MAX_HUD_FIELDS + 1];
61 string hud_title[MAX_HUD_FIELDS + 1];
62 int hud_num_fields;
63
64 string scores_label[MAX_SCORE];
65 int scores_flags[MAX_SCORE];
66 string teamscores_label[MAX_SCORE];
67 int teamscores_flags[MAX_SCORE];
68 .int scores[MAX_SCORE];
69 .float teamscores[MAX_TEAMSCORE];
70
71 #define IS_INCREASING(x) ( (x)&SFL_LOWER_IS_BETTER )
72 #define IS_DECREASING(x) ( !((x)&SFL_LOWER_IS_BETTER) )
73
74
75 vector hud_fontsize;
76
77 float RANKINGS_RECEIVED_CNT;
78 string grecordholder[RANKINGS_CNT];
79 float grecordtime[RANKINGS_CNT];
80 //float csqc_flags;
81
82 entity playerslots[255]; // 255 is engine limit on maxclients
83 entity teamslots[17];    // 17 teams (including "spectator team")
84 .float gotscores;
85 .entity owner;
86 .float ready;
87 .float eliminated;
88
89 .void(entity) draw;
90 .void(entity) draw2d;
91 .void(entity) entremove;
92 float drawframetime;
93 vector view_origin, view_forward, view_right, view_up;
94
95 bool button_zoom;
96 bool spectatorbutton_zoom;
97 bool button_attack2;
98
99 Weapon activeweapon;
100 Weapon switchingweapon;
101 Weapon switchweapon;
102 float current_viewzoom;
103 float zoomin_effect;
104 float warmup_stage;
105
106 void Fog_Force();
107
108 string getcommandkey(string text, string command);
109
110 string vote_called_vote;
111 float ready_waiting;
112 float ready_waiting_for_me;
113 float vote_waiting;
114 float vote_waiting_for_me;
115
116 float current_zoomfraction;
117
118 float cs_project_is_b0rked;
119 float vid_width, vid_height, vid_pixelheight;
120
121 float camera_active;            // Demo camera is active if set to true
122 float chase_active_backup;
123 float camera_roll;
124 vector camera_direction;
125
126 void centerprint_hud(string strMessage);
127 void centerprint_kill(float id);
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_trueaim_minrange;
142
143 float hud;
144 float view_quality;
145 int framecount;
146 .float health;