]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/main.qh
Merge branch 'master' into fruitiex/newpanelhud
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / main.qh
1 const string string_null;
2
3 // --------------------------------------------------------------------------
4 // MENU Functionality
5
6 #define DATABUF_PING 0
7 #define DATABUF_CAPTURES (1*maxclients)
8 #define DATABUF_DEATHS (2*maxclients)
9 #define DATABUF_RETURNS (3*maxclients)
10
11 #define DATABUF_NEXT (5*maxclients)
12
13 void() menu_show_error;
14 void() menu_sub_null;
15
16 float menu_visible;
17 var void() menu_show;
18 var float(float bInputType, float nPrimary, float nSecondary) menu_action;
19
20 // --------------------------------------------------------------------------
21 // CTF
22
23 void() ctf_menu_show;
24 string ctf_temp_1;
25
26 // --------------------------------------------------------------------------
27 // Onslaught
28
29 // Map coordinate base calculations need these
30 vector mi_center;
31 vector mi_scale;
32 // Minimap
33 string minimapname;
34 float ons_showmap;
35
36 // --------------------------------------------------------------------------
37 // General stuff
38
39 float drawfont;
40 float postinit;
41 float gametype;
42
43 //float sorted_players;
44 //float sorted_teams;
45
46 // Defs
47 //.float ctf_state;
48 //.float health;
49
50 // Constants
51 const float COLOR_TEAM_RED = 64;
52 const float COLOR_TEAM_BLUE = 208;
53
54 const float COLOR_TEAM1       = 4;  // red
55 const float COLOR_TEAM2       = 13; // blue
56 const float COLOR_TEAM3       = 12; // yellow
57 const float COLOR_TEAM4       = 9; // pink
58 const float COLOR_SPECTATOR = 1337;
59
60 #define FONT_DEFAULT 0
61 #define FONT_USER 8
62
63 // --------------------------------------------------------------------------
64 // Scoreboard stuff
65
66 #define MAX_HUD_FIELDS 16
67
68 #define SP_END -1
69
70 #define SP_PING -2
71 #define SP_NAME -3
72 #define SP_KDRATIO -4
73 #define SP_CLRATIO -5
74 #define SP_PL -6
75 #define SP_FRAGS -7
76
77 #define SP_SEPARATOR -100
78
79 float hud_field[MAX_HUD_FIELDS + 1];
80 float hud_size[MAX_HUD_FIELDS + 1];
81 string hud_title[MAX_HUD_FIELDS + 1];
82 float hud_num_fields;
83
84 float hud_font;
85 float hud_bigfont;
86
87 string scores_label[MAX_SCORE];
88 float scores_flags[MAX_SCORE];
89 string teamscores_label[MAX_SCORE];
90 float teamscores_flags[MAX_SCORE];
91 .float scores[MAX_SCORE]; FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(scores);
92 .float teamscores[MAX_TEAMSCORE]; FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(teamscores);
93
94 #define IS_INCREASING(x) ( (x)&SFL_LOWER_IS_BETTER )
95 #define IS_DECREASING(x) ( !((x)&SFL_LOWER_IS_BETTER) )
96
97
98 vector hud_fontsize;
99 vector hud_fontsize_spec;
100
101 float RANKINGS_RECEIVED_CNT;
102 string grecordholder[RANKINGS_CNT];
103 float grecordtime[RANKINGS_CNT];
104 //float csqc_flags;
105
106 entity playerslots[255]; // 255 is engine limit on maxclients
107 entity teamslots[17];    // 17 teams (including "spectator team")
108 .float gotscores;
109 .entity owner;
110 .float ready;
111
112 .void(void) draw;
113 .void(void) draw2d;
114 .void(void) entremove;
115 float drawframetime;
116 vector view_origin, view_angles, view_forward, view_right, view_up;
117
118 float button_zoom;
119 float spectatorbutton_zoom;
120 float button_attack2;
121 float activeweapon;
122 float current_viewzoom;
123 float zoomin_effect;
124 float ignore_plus_zoom;
125 float ignore_minus_zoom;
126 float warmup_stage;
127
128 string getcommandkey(string text, string command);
129 float hud_showbinds;
130 float hud_showbinds_limit;
131
132 string vote_called_vote;
133 float ready_waiting;
134 float ready_waiting_for_me;
135 float vote_waiting;
136 float vote_waiting_for_me;
137
138 float previous_game_starttime;
139 entity restartAnnouncer; //a temporary entity which will play the countdown sounds 3, 2, 1 for the client
140 void restartAnnouncer_Think();
141
142 float current_zoomfraction;
143
144 float cs_project_is_b0rked;
145 float vid_width, vid_height, vid_pixelheight;
146
147 float camera_active;            // Demo camera is active if set to TRUE
148 float chase_active_backup;
149 float camera_roll;
150 vector camera_direction;
151
152 void centerprint(string strMessage);
153
154 #define ALPHA_MIN_VISIBLE 0.003
155
156 float armorblockpercent;
157 float g_weaponswitchdelay;
158
159 //hooks
160 float calledhooks;
161 #define HOOK_START    1
162 #define HOOK_END      2
163
164 .float ping, ping_packetloss, ping_movementloss;
165
166 float g_balance_grenadelauncher_secondary_bouncefactor;
167 float g_balance_grenadelauncher_secondary_bouncestop;