]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/client/hud/hud.qh
Whitelist g_casings
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / hud.qh
1 #pragma once
2
3 #include <common/weapons/_all.qh>
4 #include <common/scores.qh>
5
6 void Hud_Dynamic_Frame();
7
8 bool HUD_Radar_Clickable();
9 void HUD_Radar_Mouse();
10 bool HUD_WouldShowCursor();
11 bool QuickMenu_IsOpened();
12
13 REGISTRY(hud_panels, BITS(6))
14 REGISTER_REGISTRY(hud_panels)
15
16 REGISTRY_DEFINE_GET(hud_panels, NULL)
17
18 #define _REGISTER_HUD_PANEL(id, draw_func, export_func, configflags, showflags) \
19         void draw_func(); \
20         void export_func(int fh); \
21         REGISTER(hud_panels, HUD_PANEL, id, m_id, new_pure(hud_panel)) { \
22                 this.panel_id = this.m_id; \
23                 this.panel_draw = draw_func; \
24                 this.panel_export = export_func; \
25                 this.panel_name = strzone(strtolower(#id)); \
26                 this.panel_configflags = configflags; \
27                 this.panel_showflags = showflags; \
28         }
29
30 #define REGISTER_HUD_PANEL(id, draw_func, configflags, showflags) \
31         _REGISTER_HUD_PANEL(id, draw_func, draw_func##_Export, configflags, showflags)
32
33 #define HUD_PANEL(NAME) HUD_PANEL_##NAME
34
35 // draw the background/borders
36 #define HUD_Panel_DrawBg() MACRO_BEGIN \
37         if(panel.current_panel_bg != "0" && panel.current_panel_bg != "") \
38                 draw_BorderPicture( \
39                         HUD_Shift(panel_pos - '1 1 0' * panel_bg_border), \
40                         panel.current_panel_bg, \
41                         HUD_Scale(panel_size + '1 1 0' * 2 * panel_bg_border), \
42                         panel_bg_color, panel_bg_alpha, \
43                         HUD_Scale('1 1 0' * BORDER_MULTIPLIER * panel_bg_border) \
44                 ); \
45 MACRO_END
46
47 int panel_order[REGISTRY_MAX(hud_panels)];
48 string hud_panelorder_prev;
49
50 bool hud_draw_maximized;
51 bool hud_panel_radar_maximized;
52 bool hud_panel_radar_mouse;
53 float hud_panel_radar_bottom;
54 bool hud_panel_radar_temp_hidden;
55 bool chat_panel_modified;
56 bool radar_panel_modified;
57
58 float HUD_Radar_InputEvent(float bInputType, float nPrimary, float nSecondary);
59 void HUD_Radar_Hide_Maximized();
60
61 float HUD_GetRowCount(int item_count, vector size, float item_aspect);
62 vector HUD_Get_Num_Color(float hp, float maxvalue, bool blink);
63 void DrawNumIcon(vector myPos, vector mySize, float theTime, string icon, bool vertical, bool icon_right_align, vector color, float theAlpha);
64 void DrawNumIcon_expanding(vector myPos, vector mySize, float theTime, string icon, bool vertical, int icon_right_align, vector color, float theAlpha, float fadelerp);
65 void HUD_Panel_DrawHighlight(vector pos, vector mySize, vector color, float theAlpha, int drawflag);
66 vector HUD_GetTableSize_BestItemAR(int item_count, vector psize, float item_aspect);
67
68 void HUD_Reset ();
69 void HUD_Main ();
70
71 int race_CheckName(string net_name);
72 string MakeRaceString(int cp, float mytime, float theirtime, float othertime, float lapdelta, string theirname);
73
74 int vote_yescount;
75 int vote_nocount;
76 int vote_needed;
77 int vote_highlighted; // currently selected vote
78
79 int vote_active; // is there an active vote?
80 int vote_prev; // previous state of vote_active to check for a change
81 float vote_alpha;
82 float vote_change; // "time" when vote_active changed
83
84 vector mousepos;
85 vector panel_click_distance; // mouse cursor distance from the top left corner of the panel (saved only upon a click)
86 vector panel_click_resizeorigin; // coordinates for opposite point when resizing
87 float resizeCorner; // 1 = topleft, 2 = topright, 3 = bottomleft, 4 = bottomright
88 entity highlightedPanel;
89 float highlightedAction; // 0 = nothing, 1 = move, 2 = resize
90
91 const float BORDER_MULTIPLIER = 4;
92 float scoreboard_bottom;
93 int weapon_accuracy[REGISTRY_MAX(Weapons)];
94
95 entity complain_weapon;
96 int complain_weapon_type;
97 float complain_weapon_time;
98
99 PlayerScoreField ps_primary, ps_secondary;
100 int ts_primary, ts_secondary;
101
102 .Weapon last_switchweapon;
103 .Weapon last_activeweapon;
104 float weapontime;
105 float weaponprevtime;
106
107 float teamnagger;
108
109 int hudShiftState;
110 const int S_SHIFT = 1;
111 const int S_CTRL = 2;
112 const int S_ALT = 4;
113
114 float hud_fade_alpha;
115
116 string hud_skin_path;
117 string hud_skin_prev;
118
119 vector myteamcolors;
120
121 entity highlightedPanel_backup;
122 vector panel_pos_backup;
123 vector panel_size_backup;
124
125 vector panel_size_copied;
126
127 entity panel;
128 entityclass(HUDPanel);
129 classfield(HUDPanel) .string panel_name;
130 classfield(HUDPanel) .int panel_id;
131 classfield(HUDPanel) .vector current_panel_pos;
132 classfield(HUDPanel) .vector current_panel_size;
133 classfield(HUDPanel) .string current_panel_bg;
134 classfield(HUDPanel) .float current_panel_bg_alpha;
135 classfield(HUDPanel) .float current_panel_bg_border;
136 classfield(HUDPanel) .vector current_panel_bg_color;
137 classfield(HUDPanel) .float current_panel_bg_color_team;
138 classfield(HUDPanel) .float current_panel_bg_padding;
139 classfield(HUDPanel) .float current_panel_fg_alpha;
140 classfield(HUDPanel) .float update_time;
141 float panel_enabled;
142 vector panel_pos;
143 vector panel_size;
144 string panel_bg_str; // "_str" vars contain the raw value of the cvar, non-"_str" contains what hud.qc code should use
145 vector panel_bg_color;
146 string panel_bg_color_str;
147 float panel_bg_color_team;
148 string panel_bg_color_team_str;
149 float panel_fg_alpha;
150 float panel_bg_alpha;
151 string panel_bg_alpha_str;
152 float panel_bg_border;
153 string panel_bg_border_str;
154 float panel_bg_padding;
155 string panel_bg_padding_str;
156
157 classfield(HUDPanel) .void() panel_draw;
158 classfield(HUDPanel) .void(int fh) panel_export;
159
160 // chat panel can be reduced / moved while the mapvote is active
161 // let know the mapvote panel about chat pos and size
162 float chat_posy;
163 float chat_sizey;
164
165 float current_player;
166
167 float autocvar_hud_dynamic_follow;
168 float autocvar_hud_dynamic_follow_scale;
169 vector autocvar_hud_dynamic_follow_scale_xyz;
170
171 vector hud_dynamic_shake_realofs;
172 float hud_dynamic_shake_factor;
173 float hud_dynamic_shake_time;
174
175 // shared across viewmodel effects and dynamic hud code
176 vector cl_followmodel_ofs;
177 float cl_followmodel_time;
178
179 vector hud_scale;
180 vector hud_scale_current = '1 1 0';
181 vector hud_shift;
182 vector hud_shift_current = '0 0 0';
183 vector hud_scale_center;
184
185 void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag);
186
187 .int panel_showflags;
188 const int PANEL_SHOW_MAINGAME = BIT(0); // show in the main HUD
189 const int PANEL_SHOW_MINIGAME = BIT(1); // show when minigames panels are shown
190 const int PANEL_SHOW_MAPVOTE  = BIT(2); // show during map vote
191 const int PANEL_SHOW_WITH_SB  = BIT(3); // show when scoreboard is on
192
193 .int panel_configflags;
194 const int PANEL_CONFIG_NO        = 0x00;
195 const int PANEL_CONFIG_MAIN      = 0x01;
196 const int PANEL_CONFIG_CANBEOFF  = 0x02; // panel can be disabled (if disabled it's displayed with a low alpha)
197
198
199 // prev_* vars contain the health/armor at the previous FRAME
200 // set to -1 when player is dead or was not playing
201 int prev_health, prev_armor;
202 float health_damagetime, armor_damagetime;
203 int health_beforedamage, armor_beforedamage;
204 // old_p_* vars keep track of previous values when smoothing value changes of the progressbar
205 int old_p_health, old_p_armor;
206 float old_p_healthtime, old_p_armortime;
207 // prev_p_* vars contain the health/armor progressbar value at the previous FRAME
208 // set to -1 to forcedly stop effects when we switch spectated player (e.g. from playerX: 70h to playerY: 50h)
209 int prev_p_health, prev_p_armor;
210
211 void HUD_ItemsTime();
212
213 REGISTER_HUD_PANEL(WEAPONS,         HUD_Weapons,        PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // WEAPONS
214 REGISTER_HUD_PANEL(AMMO,            HUD_Ammo,           PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // AMMO
215 REGISTER_HUD_PANEL(POWERUPS,        HUD_Powerups,       PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // POWERUPS
216 REGISTER_HUD_PANEL(HEALTHARMOR,     HUD_HealthArmor,    PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // HEALTHARMOR
217 REGISTER_HUD_PANEL(NOTIFY,          HUD_Notify,         PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                                          ) // NOTIFY
218 REGISTER_HUD_PANEL(TIMER,           HUD_Timer,          PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // TIMER
219 REGISTER_HUD_PANEL(RADAR,           HUD_Radar,          PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // RADAR
220 REGISTER_HUD_PANEL(SCORE,           HUD_Score,          PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                                          ) // SCORE
221 REGISTER_HUD_PANEL(RACETIMER,       HUD_RaceTimer,      PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // RACETIMER
222 REGISTER_HUD_PANEL(VOTE,            HUD_Vote,           PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // VOTE
223 REGISTER_HUD_PANEL(MODICONS,        HUD_ModIcons,       PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                            | PANEL_SHOW_WITH_SB) // MODICONS
224 REGISTER_HUD_PANEL(PRESSEDKEYS,     HUD_PressedKeys,    PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // PRESSEDKEYS
225 REGISTER_HUD_PANEL(CHAT,            HUD_Chat,           PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // CHAT
226 REGISTER_HUD_PANEL(ENGINEINFO,      HUD_EngineInfo,     PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // ENGINEINFO
227 REGISTER_HUD_PANEL(INFOMESSAGES,    HUD_InfoMessages,   PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // INFOMESSAGES
228 REGISTER_HUD_PANEL(PHYSICS,         HUD_Physics,        PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // PHYSICS
229 REGISTER_HUD_PANEL(CENTERPRINT,     HUD_CenterPrint,    PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                            | PANEL_SHOW_WITH_SB) // CENTERPRINT
230 REGISTER_HUD_PANEL(MINIGAMEBOARD,   HUD_MinigameBoard,  PANEL_CONFIG_NO                          ,                       PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // MINIGAMEBOARD
231 REGISTER_HUD_PANEL(MINIGAMESTATUS,  HUD_MinigameStatus, PANEL_CONFIG_NO                          ,                       PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // MINIGAMESTATUS
232 REGISTER_HUD_PANEL(MINIGAMEHELP,    HUD_MinigameHelp,   PANEL_CONFIG_NO                          ,                       PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // MINIGAMEHELP
233 REGISTER_HUD_PANEL(MINIGAMEMENU,    HUD_MinigameMenu,   PANEL_CONFIG_NO                          , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                      | PANEL_SHOW_WITH_SB) // MINIGAMEMENU
234 REGISTER_HUD_PANEL(MAPVOTE,         MapVote_Draw,       PANEL_CONFIG_NO                          ,                                             PANEL_SHOW_MAPVOTE                     ) // MAPVOTE
235 REGISTER_HUD_PANEL(ITEMSTIME,       HUD_ItemsTime,      PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // ITEMSTIME
236 REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      PANEL_CONFIG_MAIN                        , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                                          ) // QUICKMENU
237 REGISTER_HUD_PANEL(SCOREBOARD,      Scoreboard_Draw,    PANEL_CONFIG_NO                          , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // SCOREBOARD
238 // always add new panels to the end of list
239
240 // Because calling lots of functions in QC apparently cuts fps in half on many machines:
241 // ----------------------
242 // MACRO HELL STARTS HERE
243 // ----------------------
244 // Little help for the poor people who have to make sense of this: Start from the bottom ;)
245
246 // Get value for panel.current_panel_bg: if "" fetch default, else use panel_bg_str
247 // comment on last line of macro: // we probably want to see a background in config mode at all times...
248 #define HUD_Panel_GetBg() MACRO_BEGIN \
249         string panel_bg; \
250         if (!autocvar__hud_configure && panel_bg_str == "0") { \
251                 panel_bg = "0"; \
252         } else { \
253                 if (panel_bg_str == "") { \
254                         panel_bg_str = autocvar_hud_panel_bg; \
255                 } \
256                 if (panel_bg_str == "0" && !autocvar__hud_configure) { \
257                         panel_bg = "0"; \
258                 } else { \
259                         if (panel_bg_str == "0" && autocvar__hud_configure) \
260                                 panel_bg_alpha_str = "0"; \
261                         panel_bg = strcat(hud_skin_path, "/", panel_bg_str); \
262                         if (precache_pic(panel_bg) == "") { \
263                                 panel_bg = strcat(hud_skin_path, "/", "border_default"); \
264                                 if (precache_pic(panel_bg) == "") { \
265                                         panel_bg = strcat("gfx/hud/default/", "border_default"); \
266                                 } \
267                         } \
268                 } \
269         } \
270         strcpy(panel.current_panel_bg, panel_bg); \
271 MACRO_END
272
273 // Get value for panel_bg_color: if "" fetch default, else use panel_bg_color. Convert pants, shirt or teamcolor into a vector.
274 #define HUD_Panel_GetColor() MACRO_BEGIN \
275         if ((teamplay) && panel_bg_color_team > 0) { \
276                 if (autocvar__hud_configure && myteam == NUM_SPECTATOR) \
277                         panel_bg_color = '1 0 0' * panel_bg_color_team; \
278                 else \
279                         panel_bg_color = myteamcolors * panel_bg_color_team; \
280         } else if (autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && panel_bg_color_team > 0) { \
281                 panel_bg_color = '1 0 0' * panel_bg_color_team; \
282         } else { \
283                 if (panel_bg_color_str == "") { \
284                         panel_bg_color = autocvar_hud_panel_bg_color; \
285                 } else { \
286                         if (panel_bg_color_str == "shirt") { \
287                                 panel_bg_color = colormapPaletteColor(floor(entcs_GetClientColors(current_player) / 16), 0); \
288                         } else if (panel_bg_color_str == "pants") { \
289                                 panel_bg_color = colormapPaletteColor(entcs_GetClientColors(current_player) % 16, 1); \
290                         } else { \
291                                 panel_bg_color = stov(panel_bg_color_str); \
292                         } \
293                 } \
294         } \
295 MACRO_END
296
297 // Get value for panel_bg_color_team: if "" fetch default, else use panel_bg_color_team_str
298 #define HUD_Panel_GetColorTeam() MACRO_BEGIN \
299         if (panel_bg_color_team_str == "") { \
300                 panel_bg_color_team = autocvar_hud_panel_bg_color_team; \
301         } else { \
302                 panel_bg_color_team = stof(panel_bg_color_team_str); \
303         } \
304 MACRO_END
305
306 // Get value for panel_bg_alpha: if "" fetch default, else use panel_bg_alpha. Also do various menu dialog fadeout/in checks, and minalpha checks
307 // comment on line 3 of macro: // do not set a minalpha cap when showing the config dialog for this panel
308 #define HUD_Panel_GetBgAlpha() MACRO_BEGIN \
309         if (panel_bg_alpha_str == "") { \
310                 panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha); \
311         } \
312         panel_bg_alpha = stof(panel_bg_alpha_str); \
313         if (autocvar__hud_configure) { \
314                 if (!panel_enabled) \
315                         panel_bg_alpha = 0.25; \
316                 else if (hud_configure_menu_open == 2 && panel == highlightedPanel) \
317                         panel_bg_alpha = (1 - autocvar__menu_alpha) * max(cvar("hud_configure_bg_minalpha"), panel_bg_alpha) + autocvar__menu_alpha * panel_bg_alpha;\
318                 else \
319                         panel_bg_alpha = max(cvar("hud_configure_bg_minalpha"), panel_bg_alpha); \
320         } \
321 MACRO_END
322
323 // Get value for panel_fg_alpha. Also do various minalpha checks
324 // comment on line 2 of macro: // ALWAYS show disabled panels at 0.25 alpha when in config mode
325 #define HUD_Panel_GetFgAlpha() MACRO_BEGIN \
326         panel_fg_alpha = autocvar_hud_panel_fg_alpha; \
327         if (autocvar__hud_configure && !panel_enabled) \
328                 panel_fg_alpha = 0.25; \
329 MACRO_END
330
331 // Get border. See comments above, it's similar.
332 #define HUD_Panel_GetBorder() MACRO_BEGIN \
333         if (panel_bg_border_str == "") { \
334                 panel_bg_border = autocvar_hud_panel_bg_border; \
335         } else { \
336                 panel_bg_border = stof(panel_bg_border_str); \
337         } \
338 MACRO_END
339
340 // Get padding. See comments above, it's similar.
341 // last line is a port of the old function, basically always make sure the panel contents are at least 5 pixels tall/wide, to disallow extreme padding values
342 #define HUD_Panel_GetPadding() MACRO_BEGIN \
343         if (panel_bg_padding_str == "") { \
344                 panel_bg_padding = autocvar_hud_panel_bg_padding; \
345         } else { \
346                 panel_bg_padding = stof(panel_bg_padding_str); \
347         } \
348         panel_bg_padding = min(min(panel_size.x, panel_size.y)/2 - 5, panel_bg_padding); \
349 MACRO_END
350
351 // return smoothly faded pos and size of given panel when a dialog is active
352 // don't center too wide panels, it doesn't work with different resolutions
353 #define HUD_Panel_UpdatePosSize_ForMenu() MACRO_BEGIN \
354         vector new_size = panel_size; \
355         float max_panel_width = 0.52 * vid_conwidth; \
356         if(panel_size.x > max_panel_width) \
357         { \
358                 new_size.x = max_panel_width; \
359                 new_size.y = panel_size.y * (new_size.x / panel_size.x); \
360         } \
361         vector new_pos = vec2(panel_bg_border + 0.5 * max_panel_width, 0.5 * vid_conheight) - 0.5 * new_size; \
362         panel_pos = (1 - autocvar__menu_alpha) * panel_pos + (autocvar__menu_alpha) * new_pos; \
363         panel_size = (1 - autocvar__menu_alpha) * panel_size + (autocvar__menu_alpha) * new_size; \
364 MACRO_END
365
366 // Scale the pos and size vectors to absolute coordinates
367 #define HUD_Panel_ScalePosSize() MACRO_BEGIN \
368         panel_pos.x *= vid_conwidth; panel_pos.y *= vid_conheight; \
369         panel_size.x *= vid_conwidth; panel_size.y *= vid_conheight; \
370 MACRO_END
371
372 float panel_fade_alpha;
373 void HUD_Panel_LoadCvars();
374
375 #define Hud_Panel_GetPanelEnabled() \
376         panel_enabled = ((panel.panel_configflags & PANEL_CONFIG_CANBEOFF) \
377                                         ? cvar(strcat("hud_panel_", panel.panel_name)) : true)
378
379 #define HUD_Panel_UpdatePosSize() MACRO_BEGIN \
380         Hud_Panel_GetPanelEnabled(); \
381         panel_pos = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_pos"))); \
382         panel_size = stov(cvar_string(strcat("hud_panel_", panel.panel_name, "_size"))); \
383         HUD_Panel_ScalePosSize(); \
384         if (hud_configure_menu_open == 2 && panel == highlightedPanel) { \
385                 HUD_Panel_UpdatePosSize_ForMenu(); \
386         } \
387         panel_bg_border_str = cvar_string(strcat("hud_panel_", panel.panel_name, "_bg_border")); \
388         HUD_Panel_GetBorder(); \
389 MACRO_END
390
391 const int NOTIFY_MAX_ENTRIES = 10;
392 const float NOTIFY_ICON_MARGIN = 0.02;
393
394 int notify_index;
395 int notify_count;
396 float notify_times[NOTIFY_MAX_ENTRIES];
397 string notify_attackers[NOTIFY_MAX_ENTRIES];
398 string notify_victims[NOTIFY_MAX_ENTRIES];
399 string notify_icons[NOTIFY_MAX_ENTRIES];
400
401 void HUD_Notify_Push(string icon, string attacker, string victim);
402
403 var void HUD_ModIcons_GameType(vector pos, vector size);
404 void HUD_ModIcons_SetFunc();