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