70 mousepos_x = nPrimary;
71 mousepos_y = nSecondary;
79 bool key_pressed = (bInputType == 0);
95 else if (nPrimary ==
K_ESCAPE && key_pressed)
102 string con_keys =
strcat(findkeysforcommand(
"toggleconsole", 0),
" ", findkeysforcommand(
"+use", 0)) ;
105 for (i = 0; i < keys; ++i)
111 if ( STAT(HEALTH) <= 0 )
114 con_keys = findkeysforcommand(
"+showscores", 0);
116 for (i = 0; i < keys; ++i)
125 else if (key_pressed)
164 if ( mousepos_x < panel_pos_x || mousepos_x > panel_pos_x + panel_size_x ||
165 mousepos_y < panel_pos_y || mousepos_y > panel_pos_y + panel_size_y )
171 localcmd(sprintf(
"cmd ons_spawn %f %f %f",pos_x,pos_y,pos_z));
192 return 90 * rotation;
221 float zoom_factor = 0;
234 panel_bg =
"gfx/hud/default/border_default";
265 float scale2d, normalsize, bigsize;
288 vector c0, c1, c2, c3, span;
294 span.x =
max(c0_x, c1_x, c2_x, c3_x) -
min(c0_x, c1_x, c2_x, c3_x);
295 span.y =
max(c0_y, c1_y, c2_y, c3_y) -
min(c0_y, c1_y, c2_y, c3_y);
305 if(bigsize > normalsize)
306 normalsize = bigsize;
308 teamradar_size = zoom_factor * bigsize + (1 - zoom_factor) * normalsize;
320 if ( hud_panel_radar_mouse )
321 if ( GetResource(it, RES_HEALTH) >= 0 )
322 if ( it.team == myteam + 1 || mutator_returnvalue || !teamplay )
324 vector coord = teamradar_texcoord_to_2dcoord(teamradar_3dcoord_to_texcoord(it.origin));
325 if(vdist((mousepos - coord), <, 8))
328 brightcolor_x = min(1,it.teamradar_color_x*1.5);
329 brightcolor_y = min(1,it.teamradar_color_y*1.5);
330 brightcolor_z = min(1,it.teamradar_color_z*1.5);
331 drawpic(coord -
'8 8 0',
"gfx/teamradar_icon_glow",
'16 16 0', brightcolor, panel_fg_alpha, 0);
338 if (!it.m_entcs_private)
continue;
340 color2 = entcs_GetTeam(it.sv_entnum);
349 string message = _(
"Click to select teleport destination");
351 if ( STAT(HEALTH) <= 0 )
353 message = _(
"Click to select spawn location");
bool radar_panel_modified
#define IL_EACH(this, cond, body)
bool hud_panel_radar_maximized
vector teamradar_extraclip_maxs
int hud_panel_radar_zoommode
vector teamradar_3dcoord_to_texcoord(vector in)
bool autocvar__hud_configure
vector Team_ColorRGB(int teamid)
IntrusiveList g_radarlinks
#define REGISTRY_GET(id, i)
float hud_panel_radar_foreground_alpha
void HUD_Radar_Show_Maximized(bool doshow, bool clickable)
vector teamradar_extraclip_mins
int hud_panel_radar_rotation
void teamradar_loadcvars()
vector autocvar_hud_panel_radar_maximized_size
vector teamradar_2dcoord_to_texcoord(vector in)
bool hud_panel_radar_temp_hidden
bool hud_panel_radar_mouse
float HUD_Radar_InputEvent(int bInputType, float nPrimary, float nSecondary)
#define HUD_Panel_DrawBg()
void draw_teamradar_link(vector start, vector end, int colors)
float hud_panel_radar_bottom
void draw_teamradar_icon(vector coord, entity icon, entity pingdata, vector rgb, float a)
bool HUD_Radar_Clickable()
ERASEABLE float vlen_maxnorm2d(vector v)
vector HUD_Shift(vector v)
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
vector HUD_Scale(vector v)
float current_zoomfraction
const float DRAWFLAG_NORMAL
ERASEABLE float vlen_minnorm2d(vector v)
void draw_teamradar_player(vector coord3d, vector pangles, vector rgb)
void draw_teamradar_background(float fg)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
void HUD_Radar_Export(int fh)
void HUD_Radar_Hide_Maximized()
vector teamradar_origin3d_in_texcoord
vector teamradar_origin2d
#define AL_EACH(this, T, cond, body)
int hud_panel_radar_maximized_zoommode
vector teamradar_texcoord_to_3dcoord(vector in, float oz)
float HUD_Radar_GetAngle(int rotation)
#define MUTATOR_CALLHOOK(id,...)
float hud_panel_radar_scale
ERASEABLE vector Rotate(vector v, float a)
float HUD_Radar_GetZoomFactor(int zoommode)
#define HUD_Write_Cvar(cvar)
bool autocvar_hud_panel_radar_dynamichud
IntrusiveList g_radaricons
Header file that describes the resource system.
int hud_panel_radar_maximized_rotation
void HUD_Panel_LoadCvars()
int autocvar_hud_panel_radar