Xonotic
|
#include "crosshair.qh"
#include <client/draw.qh>
#include <client/hud/panel/scoreboard.qh>
#include <client/view.qh>
#include <common/deathtypes/all.qh>
#include <common/ent_cs.qh>
#include <common/mapobjects/trigger/viewloc.qh>
#include <common/minigames/cl_minigames.qh>
#include <common/minigames/cl_minigames_hud.qh>
#include <common/mutators/mutator/overkill/oknex.qh>
#include <common/vehicles/all.qh>
#include <common/viewloc.qh>
#include <common/wepent.qh>
#include <lib/csqcmodel/cl_player.qh>
#include <lib/warpzone/common.qh>
Go to the source code of this file.
Macros | |
#define | CROSSHAIR_DO_BLUR(M, sz, wcross_name, wcross_alpha) |
#define | CROSSHAIR_DRAW(sz, wcross_name, wcross_alpha) CROSSHAIR_DO_BLUR(CROSSHAIR_DRAW_SINGLE,sz,wcross_name,wcross_alpha) |
#define | CROSSHAIR_DRAW_SINGLE(i, j, sz, scaled_sz, wcross_name, wcross_alpha) 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) |
Functions | |
vector | crosshair_getcolor (entity this, float health_stat) |
void | DrawReticle (entity this) |
float | EnemyHitCheck () |
void | HUD_Crosshair (entity this) |
void | HUD_Crosshair_ApplyPlayerAlpha (float new_alpha) |
void | HUD_Crosshair_Vehicle (entity this) |
void | TrueAim_Init () |
float | TrueAimCheck (entity wepent) |
#define CROSSHAIR_DO_BLUR | ( | M, | |
sz, | |||
wcross_name, | |||
wcross_alpha | |||
) |
#define CROSSHAIR_DRAW | ( | sz, | |
wcross_name, | |||
wcross_alpha | |||
) | CROSSHAIR_DO_BLUR(CROSSHAIR_DRAW_SINGLE,sz,wcross_name,wcross_alpha) |
Referenced by HUD_Crosshair().
#define CROSSHAIR_DRAW_SINGLE | ( | i, | |
j, | |||
sz, | |||
scaled_sz, | |||
wcross_name, | |||
wcross_alpha | |||
) | 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) |
Definition at line 174 of file crosshair.qc.
References armorblockpercent, autocvar_crosshair_color, autocvar_crosshair_color_special, autocvar_crosshair_color_special_rainbow_brightness, autocvar_crosshair_color_special_rainbow_delay, floor(), hud, HUD_Get_Num_Color(), LABEL, randomvec(), stov(), time, v, and vector().
Referenced by HUD_Crosshair(), and Vehicles_drawCrosshair().
Definition at line 678 of file crosshair.qc.
References autocvar_cl_reticle, autocvar_cl_reticle_normal_alpha, autocvar_cl_reticle_stretch, autocvar_cl_reticle_weapon, autocvar_cl_reticle_weapon_alpha, button_zoom, current_zoomfraction, DRAWFLAG_NORMAL, drawpic(), DrawReticle(), entity(), hud, max(), MAX_WEAPONSLOTS, MUTATOR_CALLHOOK, NULL, reticle_type, spectatee_status, string_null, vector(), vid_conheight, vid_conwidth, viewloc, viewmodels, Weapon::w_reticle, and zoomscript_caught.
Referenced by CSQC_UpdateView(), and DrawReticle().
float EnemyHitCheck | ( | ) |
Definition at line 52 of file crosshair.qc.
References maxclients, NUM_SPECTATOR, project_3d_to_2d(), SHOTTYPE_HITENEMY, SHOTTYPE_HITTEAM, SHOTTYPE_HITWORLD, teamplay, trace_endpos, trace_ent, trace_networkentity, and wcross_origin.
Referenced by TrueAimCheck().
Definition at line 226 of file crosshair.qc.
References autocvar__menu_alpha, autocvar_chase_active, autocvar_chase_front, autocvar_cl_lockview, autocvar_crosshair, autocvar_crosshair_2d, autocvar_crosshair_alpha, autocvar_crosshair_chase, autocvar_crosshair_chase_playeralpha, autocvar_crosshair_color_special, autocvar_crosshair_dot, autocvar_crosshair_dot_alpha, autocvar_crosshair_dot_color, autocvar_crosshair_dot_color_custom, autocvar_crosshair_dot_size, autocvar_crosshair_effect_scalefade, autocvar_crosshair_effect_time, autocvar_crosshair_enabled, autocvar_crosshair_hitindication, autocvar_crosshair_hitindication_color, autocvar_crosshair_hitindication_per_weapon_color, autocvar_crosshair_hitindication_speed, autocvar_crosshair_hittest, autocvar_crosshair_hittest_blur_teammate, autocvar_crosshair_hittest_blur_wall, autocvar_crosshair_hittest_showimpact, autocvar_crosshair_per_weapon, autocvar_crosshair_pickup, autocvar_crosshair_pickup_speed, autocvar_crosshair_ring, autocvar_crosshair_ring_arc, autocvar_crosshair_ring_arc_cold_alpha, autocvar_crosshair_ring_arc_hot_alpha, autocvar_crosshair_ring_arc_hot_color, autocvar_crosshair_ring_hagar, autocvar_crosshair_ring_hagar_alpha, autocvar_crosshair_ring_inner, autocvar_crosshair_ring_minelayer, autocvar_crosshair_ring_minelayer_alpha, autocvar_crosshair_ring_reload, autocvar_crosshair_ring_reload_alpha, autocvar_crosshair_ring_reload_size, autocvar_crosshair_ring_size, autocvar_crosshair_ring_vortex, autocvar_crosshair_ring_vortex_alpha, autocvar_crosshair_ring_vortex_currentcharge_movingavg_rate, autocvar_crosshair_ring_vortex_currentcharge_scale, autocvar_crosshair_ring_vortex_inner_alpha, autocvar_crosshair_ring_vortex_inner_color_blue, autocvar_crosshair_ring_vortex_inner_color_green, autocvar_crosshair_ring_vortex_inner_color_red, autocvar_crosshair_size, bound(), camera_active, CROSSHAIR_DRAW, crosshair_getcolor(), csqcplayer, DrawCircleClippedPic(), DRAWFLAG_ADDITIVE, entity(), fabs(), frametime, hitindication_crosshair_size, hud, HUD_Crosshair_ApplyPlayerAlpha(), HUD_Crosshair_Vehicle(), HUD_MinigameMenu_IsOpened(), intermission, max(), min(), MOVE_NORMAL, MOVE_WORLDONLY, MUTATOR_CALLHOOK, NULL, pickup_crosshair_size, pickup_crosshair_time, pointinsidebox, project_3d_to_2d(), scoreboard_active, SHOTTYPE_HITOBSTRUCTION, SHOTTYPE_HITTEAM, SHOTTYPE_HITWORLD, sin(), spectatee_status, stov(), strcat(), strfree, string_null, strunzone(), strzone(), time, trace_endpos, trace_ent, TrueAimCheck(), unaccounted_damage, use_vortex_chargepool, v, vdist, vec3, vector(), vid_conheight, vid_conwidth, view_forward, view_origin, VIEWLOC_FREEAIM, viewloc_mousepos, viewmodels, vortex_charge_movingavg, WarpZone_TraceLine(), wcross_alpha_goal_prev, wcross_alpha_prev, wcross_changedonetime, wcross_color_goal_prev, wcross_color_prev, wcross_name_alpha_goal_prev, wcross_name_alpha_goal_prev_prev, wcross_name_changedonetime, wcross_name_changestarttime, wcross_name_goal_prev, wcross_name_goal_prev_prev, wcross_origin, wcross_resolution_goal_prev, wcross_resolution_goal_prev_prev, wcross_ring_prev, wcross_scale_goal_prev, wcross_scale_prev, WEP_CVAR, and WEP_CVAR_SEC.
Definition at line 217 of file crosshair.qc.
References csqcplayer, and FOREACH_ENTITY_CLASS.
Referenced by HUD_Crosshair().
Definition at line 165 of file crosshair.qc.
References hud, and REGISTRY_GET.
Referenced by HUD_Crosshair().
void TrueAim_Init | ( | ) |
Definition at line 46 of file crosshair.qc.
References DPCONTENTS_BODY, DPCONTENTS_CORPSE, DPCONTENTS_SOLID, dphitcontentsmask, new_pure, trueaim, and trueaim_rifle.
Referenced by PostInit().
Definition at line 74 of file crosshair.qc.
References decompressShotOrigin(), EnemyHitCheck(), entity(), eZ, g_trueaim_minrange, MOVE_NOMONSTERS, MOVE_NORMAL, player_localentnum, SHOTTYPE_HITOBSTRUCTION, SHOTTYPE_HITWORLD, trace_endpos, trueaim, trueaim_rifle, vdist, vector(), view_forward, view_origin, view_right, view_up, vlen(), w_shotorg, WEP_FLAG_NOTRUEAIM, and zoomscript_caught.
Referenced by HUD_Crosshair().
float hitindication_crosshair_size |
Definition at line 19 of file crosshair.qc.
Referenced by HUD_Crosshair().
float pickup_crosshair_size |
Definition at line 18 of file crosshair.qc.
Referenced by HUD_Crosshair().
float pickup_crosshair_time |
Definition at line 18 of file crosshair.qc.
Referenced by HUD_Crosshair().
float reticle_type |
Definition at line 22 of file crosshair.qc.
Referenced by DrawReticle().
const float SHOTTYPE_HITENEMY = 4 |
Definition at line 44 of file crosshair.qc.
Referenced by EnemyHitCheck().
const float SHOTTYPE_HITOBSTRUCTION = 2 |
Definition at line 42 of file crosshair.qc.
Referenced by HUD_Crosshair(), and TrueAimCheck().
const float SHOTTYPE_HITTEAM = 1 |
Definition at line 41 of file crosshair.qc.
Referenced by EnemyHitCheck(), and HUD_Crosshair().
const float SHOTTYPE_HITWORLD = 3 |
Definition at line 43 of file crosshair.qc.
Referenced by EnemyHitCheck(), HUD_Crosshair(), and TrueAimCheck().
entity tag_entity |
Definition at line 216 of file crosshair.qc.
entity trueaim |
Definition at line 38 of file crosshair.qc.
Referenced by TrueAim_Init(), and TrueAimCheck().
entity trueaim_rifle |
Definition at line 39 of file crosshair.qc.
Referenced by TrueAim_Init(), and TrueAimCheck().
float use_vortex_chargepool |
Definition at line 20 of file crosshair.qc.
Referenced by HUD_Crosshair().
float wcross_alpha_goal_prev |
Definition at line 27 of file crosshair.qc.
Referenced by HUD_Crosshair().
float wcross_alpha_prev |
Definition at line 25 of file crosshair.qc.
Referenced by HUD_Crosshair().
float wcross_changedonetime |
Definition at line 29 of file crosshair.qc.
Referenced by HUD_Crosshair().
vector wcross_color_goal_prev |
Definition at line 28 of file crosshair.qc.
Referenced by HUD_Crosshair().
vector wcross_color_prev |
Definition at line 26 of file crosshair.qc.
Referenced by HUD_Crosshair().
float wcross_name_alpha_goal_prev |
Definition at line 34 of file crosshair.qc.
Referenced by HUD_Crosshair().
float wcross_name_alpha_goal_prev_prev |
Definition at line 34 of file crosshair.qc.
Referenced by HUD_Crosshair().
float wcross_name_changedonetime |
Definition at line 33 of file crosshair.qc.
Referenced by HUD_Crosshair().
float wcross_name_changestarttime |
Definition at line 33 of file crosshair.qc.
Referenced by HUD_Crosshair().
string wcross_name_goal_prev |
Definition at line 31 of file crosshair.qc.
Referenced by HUD_Crosshair().
string wcross_name_goal_prev_prev |
Definition at line 31 of file crosshair.qc.
Referenced by HUD_Crosshair().
vector wcross_origin |
Definition at line 24 of file crosshair.qc.
Referenced by EnemyHitCheck(), and HUD_Crosshair().
float wcross_resolution_goal_prev |
Definition at line 32 of file crosshair.qc.
Referenced by HUD_Crosshair().
float wcross_resolution_goal_prev_prev |
Definition at line 32 of file crosshair.qc.
Referenced by HUD_Crosshair().
float wcross_ring_prev |
Definition at line 36 of file crosshair.qc.
Referenced by HUD_Crosshair().
float wcross_scale_goal_prev |
Definition at line 27 of file crosshair.qc.
Referenced by HUD_Crosshair().
float wcross_scale_prev |
Definition at line 25 of file crosshair.qc.
Referenced by HUD_Crosshair().