65 t = entcs_GetTeam(n - 1);
90 switch(wepent.activeweapon)
93 case WEP_OVERKILL_NEX:
128 traceline(traceorigin, traceorigin +
view_forward * max_shot_distance, mv, ta);
143 w_shotorg = traceorigin + dv;
149 tracebox(w_shotorg, mi, ma, trueaimpoint,
MOVE_NORMAL, ta);
167 if(
hud != HUD_BUMBLEBEE_GUN)
170 info.vr_crosshair(info,
this);
176 static float rainbow_last_flicker;
177 static vector rainbow_prev_color;
178 vector wcross_color =
'0 0 0';
183 if(
this != WEP_Null &&
hud == HUD_NORMAL)
185 wcross_color = this.wpcolor;
188 else {
goto normalcolor; }
194 float health_and_armor =
floor(v.x + 1);
201 if(
time >= rainbow_last_flicker)
206 wcross_color = rainbow_prev_color;
222 it.alpha = new_alpha;
251 if (
hud != HUD_NORMAL)
258 float wcross_alpha, wcross_resolution;
262 if (wcross_style ==
"0")
265 if (wcross_resolution == 0)
268 if (wcross_alpha == 0)
274 static int crosshair_chase_state = 0;
284 if(
csqcplayer && chase_playeralpha < 1 && my_alpha > chase_playeralpha)
286 crosshair_chase_state = 2;
303 if (new_alpha != prev_alpha)
312 if (crosshair_chase_state == 2)
313 crosshair_chase_state = 1;
314 else if (crosshair_chase_state == 1)
319 crosshair_chase_state = 0;
333 if(
vdist(v, >, 0.01))
342 vector wcross_color =
'0 0 0', wcross_size =
'0 0 0';
343 string wcross_name =
"";
344 float wcross_scale, wcross_blur;
350 e = wepent.switchingweapon;
361 wcross_resolution *= e.w_crosshair_size;
362 wcross_name = e.w_crosshair;
367 if(wcross_name ==
"")
368 wcross_name =
strcat(
"gfx/crosshair", wcross_style);
375 wcross_scale = wcross_resolution;
376 wcross_resolution = 1;
385 float stat_pickup_time = STAT(LAST_PICKUP);
389 if(
time - stat_pickup_time < 5)
457 wcross_alpha *= 0.75;
480 wcross_size = draw_getimagesize(wcross_name) * wcross_scale;
482 if(wcross_scale >= 0.001 && wcross_alpha >= 0.001)
488 float ring_value = 0, ring_scale = 0, ring_alpha = 0, ring_inner_value = 0, ring_inner_alpha = 0;
490 vector ring_rgb =
'0 0 0', ring_inner_rgb =
'0 0 0';
496 int weapon_clipload = wepent.clip_load;
497 int weapon_clipsize = wepent.clip_size;
499 float arc_heat = wepent.arc_heat_percent;
505 float chargepool = 0;
506 bool ring_vortex_enabled =
false;
509 if (wepent.activeweapon == WEP_VORTEX)
511 charge = wepent.vortex_charge;
512 chargepool = wepent.vortex_chargepool_ammo;
514 else if (wepent.activeweapon == WEP_OVERKILL_NEX)
516 charge = wepent.oknex_charge;
517 chargepool = wepent.oknex_chargepool_ammo;
520 ring_vortex_enabled =
true;
523 if (ring_vortex_enabled)
527 ring_inner_value = chargepool;
536 ring_inner_image =
"gfx/crosshair_ring_inner";
541 ring_rgb = wcross_color;
542 ring_image =
"gfx/crosshair_ring_nexgun";
546 ring_value =
bound(0, wepent.minelayer_mines /
WEP_CVAR(minelayer, limit), 1);
548 ring_rgb = wcross_color;
549 ring_image =
"gfx/crosshair_ring";
555 ring_rgb = wcross_color;
556 ring_image =
"gfx/crosshair_ring";
560 ring_value =
bound(0, weapon_clipload / weapon_clipsize, 1);
563 ring_rgb = wcross_color;
567 if ((wepent.activeweapon == WEP_RIFLE) && (weapon_clipsize == 80))
568 ring_image =
"gfx/crosshair_ring_rifle";
570 ring_image =
"gfx/crosshair_ring";
574 ring_value = arc_heat;
578 ring_image =
"gfx/crosshair_ring";
598 ring_alpha *=
bound(0, f, 1);
609 #define CROSSHAIR_DO_BLUR(M,sz,wcross_name,wcross_alpha) \ 611 vector scaled_sz = sz * wcross_size; \ 612 if(wcross_blur > 0) \ 614 for(i = -2; i <= 2; ++i) \ 615 for(j = -2; j <= 2; ++j) \ 616 M(i,j,sz,scaled_sz,wcross_name,wcross_alpha*0.04); \ 620 M(0,0,sz,scaled_sz,wcross_name,wcross_alpha); \ 624 #define CROSSHAIR_DRAW_SINGLE(i,j,sz,scaled_sz,wcross_name,wcross_alpha) \ 625 drawpic(wcross_origin - ('0.5 0 0' * (scaled_sz.x + i * wcross_blur) + '0 0.5 0' * (scaled_sz.y + j * wcross_blur)), wcross_name, scaled_sz, wcross_color, wcross_alpha, DRAWFLAG_NORMAL) 627 #define CROSSHAIR_DRAW(sz,wcross_name,wcross_alpha) \ 628 CROSSHAIR_DO_BLUR(CROSSHAIR_DRAW_SINGLE,sz,wcross_name,wcross_alpha) 643 wcross_size = draw_getimagesize(wcross_name) * wcross_scale;
649 wcross_color_old = wcross_color;
656 wcross_color = wcross_color_old;
686 float is_dead = (STAT(HEALTH) <= 0);
688 bool wep_zoomed =
false;
692 Weapon wep = wepe.activeweapon;
693 if(wep != WEP_Null && wep.wr_zoom)
695 bool do_zoom = wep.wr_zoom(wep,
NULL);
698 wep_zoomed += do_zoom;
723 vector reticle_pos =
'0 0 0', reticle_size =
'0 0 0';
float autocvar_crosshair_ring_vortex_inner_color_blue
bool autocvar_cl_reticle_stretch
float pickup_crosshair_time
#define WEP_CVAR_SEC(wepname, name)
bool autocvar_crosshair_ring_inner
float pickup_crosshair_size
const float SHOTTYPE_HITENEMY
bool autocvar_crosshair_hittest_blur_teammate
void HUD_Crosshair_ApplyPlayerAlpha(float new_alpha)
vector project_3d_to_2d(vector vec)
bool autocvar_crosshair_hittest
float wcross_changedonetime
float autocvar_crosshair_ring_vortex_alpha
bool HUD_MinigameMenu_IsOpened()
void DrawReticle(entity this)
bool autocvar_crosshair_ring
float autocvar_crosshair_alpha
float TrueAimCheck(entity wepent)
float autocvar_crosshair_dot_size
float trace_networkentity
entity viewmodels[MAX_WEAPONSLOTS]
bool autocvar_crosshair_hittest_blur_wall
#define REGISTRY_GET(id, i)
bool autocvar_crosshair_hitindication
float autocvar_crosshair_pickup_speed
float wcross_name_changedonetime
void DrawCircleClippedPic(vector centre, float radi, string pic, float f, vector rgb, float a, float drawflag)
float use_vortex_chargepool
string autocvar_crosshair_dot_color
vector autocvar_crosshair_ring_arc_hot_color
float autocvar_crosshair_effect_time
#define WEP_CVAR(wepname, name)
const int VIEWLOC_FREEAIM
float wcross_scale_goal_prev
float vortex_charge_movingavg
bool autocvar_crosshair_effect_scalefade
vector decompressShotOrigin(int f)
bool autocvar_crosshair_ring_minelayer
float wcross_resolution_goal_prev_prev
float autocvar_crosshair_size
float autocvar_crosshair_dot_alpha
bool autocvar_cl_lockview
bool autocvar_crosshair_ring_arc
string autocvar_crosshair_color
vector wcross_color_goal_prev
bool autocvar_chase_front
const float DRAWFLAG_ADDITIVE
#define FOREACH_ENTITY_CLASS(class, cond, body)
float autocvar__menu_alpha
float autocvar_crosshair_ring_arc_hot_alpha
void HUD_Crosshair_Vehicle(entity this)
#define CROSSHAIR_DRAW(sz, wcross_name, wcross_alpha)
float autocvar_crosshair_ring_hagar_alpha
const float MOVE_NOMONSTERS
string autocvar_crosshair
float autocvar_crosshair_ring_vortex_inner_color_red
float wcross_name_changestarttime
string autocvar_crosshair_hitindication_color
float autocvar_crosshair_color_special_rainbow_delay
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"))
const int MAX_WEAPONSLOTS
string wcross_name_goal_prev
float autocvar_crosshair_ring_arc_cold_alpha
float autocvar_crosshair_ring_minelayer_alpha
float autocvar_crosshair_ring_size
#define pointinsidebox(point, bmins, bmaxs)
string autocvar_crosshair_hitindication_per_weapon_color
float current_zoomfraction
float wcross_alpha_goal_prev
const float DRAWFLAG_NORMAL
float wcross_name_alpha_goal_prev_prev
string autocvar_crosshair_2d
bool autocvar_cl_reticle_weapon
float autocvar_cl_reticle_normal_alpha
bool autocvar_crosshair_chase
float wcross_resolution_goal_prev
bool autocvar_crosshair_per_weapon
float autocvar_crosshair_ring_vortex_inner_color_green
vector(float skel, float bonenum) _skel_get_boneabs_hidden
bool autocvar_crosshair_dot
vector crosshair_getcolor(entity this, float health_stat)
float autocvar_crosshair_color_special_rainbow_brightness
const float SHOTTYPE_HITOBSTRUCTION
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
bool autocvar_crosshair_ring_hagar
bool autocvar_crosshair_ring_reload
void WarpZone_TraceLine(vector org, vector end, float nomonsters, entity forent)
float autocvar_crosshair_ring_reload_size
void HUD_Crosshair(entity this)
vector HUD_Get_Num_Color(float hp, float maxvalue, bool blink)
const int WEP_FLAG_NOTRUEAIM
#define MUTATOR_CALLHOOK(id,...)
#define new_pure(class)
purely logical entities (.origin doesn't work)
float autocvar_cl_reticle_weapon_alpha
bool autocvar_crosshair_dot_color_custom
const float SHOTTYPE_HITTEAM
float autocvar_crosshair_chase_playeralpha
bool autocvar_crosshair_ring_vortex
float autocvar_crosshair_pickup
float autocvar_crosshair_ring_vortex_currentcharge_scale
bool autocvar_crosshair_enabled
int autocvar_chase_active
float wcross_name_alpha_goal_prev
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
int autocvar_crosshair_color_special
float autocvar_crosshair_ring_vortex_inner_alpha
bool autocvar_crosshair_hittest_showimpact
string w_reticle
A: reticle : per-weapon zoom reticle.
float autocvar_crosshair_hitindication_speed
float autocvar_crosshair_ring_reload_alpha
float hitindication_crosshair_size
string wcross_name_goal_prev_prev
const float SHOTTYPE_HITWORLD
float autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate