Xonotic
|
#include "cl_damagetext.qh"
Go to the source code of this file.
Classes | |
class | DamageText |
Functions | |
AUTOCVAR_SAVE (cl_damagetext, bool, true, "Draw damage dealt where you hit the enemy") | |
AUTOCVAR_SAVE (cl_damagetext_format, string, "-{total}", "How to format the damage text. {health}, {armor}, {total}, {potential}: full damage not capped to target's health, {potential_health}: health damage not capped to target's health") | |
AUTOCVAR_SAVE (cl_damagetext_format_verbose, bool, false, "{health} shows {potential_health} too when they differ; {total} shows {potential} too when they differ") | |
AUTOCVAR_SAVE (cl_damagetext_format_hide_redundant, bool, false, "hide {armor} if 0; hide {potential} and {potential_health} when same as actual") | |
AUTOCVAR_SAVE (cl_damagetext_color, vector, '1 1 0', "Damage text color") | |
AUTOCVAR_SAVE (cl_damagetext_color_per_weapon, bool, false, "Damage text uses weapon color") | |
AUTOCVAR_SAVE (cl_damagetext_size_min, float, 10, "Damage text font size for small damage") | |
AUTOCVAR_SAVE (cl_damagetext_size_min_damage, float, 25, "How much damage is considered small") | |
AUTOCVAR_SAVE (cl_damagetext_size_max, float, 16, "Damage text font size for large damage") | |
AUTOCVAR_SAVE (cl_damagetext_size_max_damage, float, 140, "How much damage is considered large") | |
AUTOCVAR_SAVE (cl_damagetext_alpha_start, float, 1, "Damage text initial alpha") | |
AUTOCVAR_SAVE (cl_damagetext_alpha_lifetime, float, 3, "Damage text lifetime in seconds") | |
AUTOCVAR_SAVE (cl_damagetext_velocity_screen, vector, '0 0 0', "Damage text move direction (screen coordinates)") | |
AUTOCVAR_SAVE (cl_damagetext_velocity_world, vector, '0 0 20', "Damage text move direction (world coordinates relative to player's view)") | |
AUTOCVAR_SAVE (cl_damagetext_offset_screen, vector, '0 -45 0', "Damage text offset (screen coordinates)") | |
AUTOCVAR_SAVE (cl_damagetext_offset_world, vector, '0 0 0', "Damage text offset (world coordinates relative to player's view)") | |
AUTOCVAR_SAVE (cl_damagetext_accumulate_range, float, 30, "Damage text spawned within this range is accumulated") | |
AUTOCVAR_SAVE (cl_damagetext_accumulate_alpha_rel, float, 0.65, "Only update existing damage text when it's above this much percentage (0 to 1) of the starting alpha") | |
AUTOCVAR_SAVE (cl_damagetext_friendlyfire, int, 1, "0: never show for friendly fire, 1: when more than 0 damage, 2: always") | |
AUTOCVAR_SAVE (cl_damagetext_friendlyfire_color, vector, '1 0 0', "Damage text color for friendlyfire") | |
AUTOCVAR_SAVE (cl_damagetext_2d, bool, true, "Show damagetext in 2D coordinates if the enemy's location is not known") | |
AUTOCVAR_SAVE (cl_damagetext_2d_pos, vector, '0.47 0.53 0', "2D damage text initial position (X and Y between 0 and 1)") | |
AUTOCVAR_SAVE (cl_damagetext_2d_alpha_start, float, 1, "2D damage text initial alpha") | |
AUTOCVAR_SAVE (cl_damagetext_2d_alpha_lifetime, float, 1.3, "2D damage text lifetime (alpha fading) in seconds") | |
AUTOCVAR_SAVE (cl_damagetext_2d_size_lifetime, float, 3, "2D damage text lifetime (size shrinking) in seconds") | |
AUTOCVAR_SAVE (cl_damagetext_2d_velocity, vector, '-25 0 0', "2D damage text move direction (screen coordinates)") | |
AUTOCVAR_SAVE (cl_damagetext_2d_overlap_offset, vector, '0 -15 0', "Offset 2D damage text by this much to prevent overlapping (screen coordinates)") | |
AUTOCVAR_SAVE (cl_damagetext_2d_close_range, float, 125, "Always use 2D damagetext for hits closer that this") | |
AUTOCVAR_SAVE (cl_damagetext_2d_out_of_view, bool, true, "Always use 2D damagetext for hits that occurred off-screen") | |
float | current_alpha (entity damage_text) |
NET_HANDLE (damagetext, bool isNew) | |
STATIC_INIT (DamageText_LegacyFormat) | |
AUTOCVAR_SAVE | ( | cl_damagetext_format | , |
string | , | ||
"-{total}" | , | ||
"How to format the damage text. {health} | , | ||
{armor} | , | ||
{total} | , | ||
{potential}:full damage not capped to target 's | health, | ||
{potential_health}:health damage not capped to target 's health" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_format_verbose | , |
bool | , | ||
false | , | ||
"{health} shows {potential_health} too when they differ; {total} shows {potential} too when they differ" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_format_hide_redundant | , |
bool | , | ||
false | , | ||
"hide {armor} if 0; hide {potential} and {potential_health} when same as actual" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_size_min_damage | , |
float | , | ||
25 | , | ||
"How much damage is considered small" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_size_max_damage | , |
float | , | ||
140 | , | ||
"How much damage is considered large" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_velocity_screen | , |
vector | , | ||
'0 0 0' | , | ||
"Damage text move direction (screen coordinates)" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_velocity_world | , |
vector | , | ||
'0 0 20' | , | ||
"Damage text move direction (world coordinates relative to player's view)" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_offset_screen | , |
vector | , | ||
'0 -45 0' | , | ||
"Damage text offset (screen coordinates)" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_offset_world | , |
vector | , | ||
'0 0 0' | , | ||
"Damage text offset (world coordinates relative to player's view)" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_accumulate_range | , |
float | , | ||
30 | , | ||
"Damage text spawned within this range is accumulated" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_accumulate_alpha_rel | , |
float | , | ||
0. | 65, | ||
"Only update existing damage text when it's above this much percentage (0 to 1) of the starting alpha" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_friendlyfire | , |
int | , | ||
1 | , | ||
"0: never show for friendly | fire, | ||
1:when more than 0 | damage, | ||
2:always" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_friendlyfire_color | , |
vector | , | ||
'1 0 0' | , | ||
"Damage text color for friendlyfire" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_2d | , |
bool | , | ||
true | , | ||
"Show damagetext in 2D coordinates if the enemy's location is not known" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_2d_pos | , |
vector | , | ||
'0.47 0.53 0' | , | ||
"2D damage text initial position (X and Y between 0 and 1)" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_2d_alpha_start | , |
float | , | ||
1 | , | ||
"2D damage text initial alpha" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_2d_alpha_lifetime | , |
float | , | ||
1. | 3, | ||
"2D damage text lifetime (alpha fading) in seconds" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_2d_size_lifetime | , |
float | , | ||
3 | , | ||
"2D damage text lifetime (size shrinking) in seconds" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_2d_velocity | , |
vector | , | ||
'-25 0 0' | , | ||
"2D damage text move direction (screen coordinates)" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_2d_overlap_offset | , |
vector | , | ||
'0 -15 0' | , | ||
"Offset 2D damage text by this much to prevent overlapping (screen coordinates)" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_2d_close_range | , |
float | , | ||
125 | , | ||
"Always use 2D damagetext for hits closer that this" | |||
) |
AUTOCVAR_SAVE | ( | cl_damagetext_2d_out_of_view | , |
bool | , | ||
true | , | ||
"Always use 2D damagetext for hits that occurred off-screen" | |||
) |
Definition at line 202 of file cl_damagetext.qc.
References time.
Referenced by NET_HANDLE().
NET_HANDLE | ( | damagetext | , |
bool | isNew | ||
) |
Definition at line 207 of file cl_damagetext.qc.
References current_alpha(), DTFLAG_BIG_ARMOR, DTFLAG_BIG_HEALTH, DTFLAG_BIG_POTENTIAL, DTFLAG_NO_ARMOR, DTFLAG_NO_POTENTIAL, DTFLAG_SAMETEAM, entity(), flags, g_drawables_2d, health, IL_EACH, make_impure, make_pure, max(), NEW, NULL, project_3d_to_2d(), projected_on_screen(), spectatee_status, vdist, vec2, vector(), vid_conheight, vid_conwidth, and view_origin.
STATIC_INIT | ( | DamageText_LegacyFormat | ) |
Definition at line 8 of file cl_damagetext.qc.
References AUTOCVAR_SAVE(), localcmd, strstrofs, and vector().