]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/main.qh
Merge branch 'terencehill/lms_itemtimes_fix' into 'master'
[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 #include <common/weapons/all.qh>
6
7 // --------------------------------------------------------------------------
8 // MENU Functionality
9
10 const float DATABUF_PING = 0;
11 #define DATABUF_CAPTURES (1*maxclients)
12 #define DATABUF_DEATHS (2*maxclients)
13 #define DATABUF_RETURNS (3*maxclients)
14
15 #define DATABUF_NEXT (5*maxclients)
16
17 void setpredraw(entity this, void(entity) pdfunc);
18
19 // --------------------------------------------------------------------------
20 // Onslaught
21
22 // Map coordinate base calculations need these
23 vector mi_center;
24 vector mi_scale;
25 // Minimap
26 string minimapname;
27
28 // --------------------------------------------------------------------------
29 // General stuff
30
31 float postinit;
32 float gametype;
33
34 //float sorted_players;
35 //float sorted_teams;
36
37 // Defs
38 //.float ctf_state;
39 //.float health;
40
41 float FONT_USER = 8;
42
43 // --------------------------------------------------------------------------
44 // Scoreboard stuff
45
46 const int MAX_HUD_FIELDS = 16;
47
48 const int SP_END = -1;
49
50 const int SP_PING = -2;
51 const int SP_NAME = -3;
52 const int SP_KDRATIO = -4;
53 const int SP_CLRATIO = -5;
54 const int SP_PL = -6;
55 const int SP_FRAGS = -7;
56 const int SP_SUM = -8;
57
58 const int SP_SEPARATOR = -100;
59
60 float hud_field[MAX_HUD_FIELDS + 1];
61 float hud_size[MAX_HUD_FIELDS + 1];
62 string hud_title[MAX_HUD_FIELDS + 1];
63 int hud_num_fields;
64
65 string scores_label[MAX_SCORE];
66 int scores_flags[MAX_SCORE];
67 string teamscores_label[MAX_SCORE];
68 int teamscores_flags[MAX_SCORE];
69 .int scores[MAX_SCORE];
70 .float teamscores[MAX_TEAMSCORE];
71
72 #define IS_INCREASING(x) ( (x)&SFL_LOWER_IS_BETTER )
73 #define IS_DECREASING(x) ( !((x)&SFL_LOWER_IS_BETTER) )
74
75
76 vector hud_fontsize;
77
78 float RANKINGS_RECEIVED_CNT;
79 string grecordholder[RANKINGS_CNT];
80 float grecordtime[RANKINGS_CNT];
81 //float csqc_flags;
82
83 entity playerslots[255]; // 255 is engine limit on maxclients
84 entity teamslots[17];    // 17 teams (including "spectator team")
85 .float gotscores;
86 .entity owner;
87 .float ready;
88 .float eliminated;
89
90 .void(entity) draw;
91 .void(entity) draw2d;
92 .void(entity) entremove;
93 float drawframetime;
94 vector view_origin, view_forward, view_right, view_up;
95
96 bool button_zoom;
97 bool spectatorbutton_zoom;
98 bool button_attack2;
99
100 Weapon activeweapon;
101 Weapon switchingweapon;
102 Weapon switchweapon;
103 float current_viewzoom;
104 float zoomin_effect;
105 float warmup_stage;
106
107 void Fog_Force();
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_trueaim_minrange;
142
143 float hud;
144 float view_quality;
145 int framecount;
146 .float health;
147
148 #endif