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