220{
222 int server_entity_index =
ReadByte();
226
227 int health, armor, potential_damage;
229 else health = ReadShort();
232 else armor = ReadShort();
235 else potential_damage = ReadShort();
236
237 return = true;
238 if (!isNew) return;
240 if (friendlyfire)
241 {
243 return;
244
246 &&
health == 0 && armor == 0)
247 return;
248 }
249
250 int client_entity_index = server_entity_index - 1;
252
257
259 bool is2d;
261
264
265
267
268
269
270
271
272 if (flags & DTFLAG_STOP_ACCUMULATION
273 || (current_alpha(it) < alphathreshold)
274 || ((autocvar_cl_damagetext_accumulate_lifetime >= 0)
275 && (time - it.hit_time > autocvar_cl_damagetext_accumulate_lifetime)))
276 {
277 it.m_group = 0;
278 }
279 else
280 {
281 health += it.m_healthdamage;
282 armor += it.m_armordamage;
283 potential_damage += it.m_potential_damage;
284
285 entDT = it;
286 }
287 break;
288 });
289
290 if (can_use_3d && !prefer_2d)
291 {
292
293 is2d = false;
294 position =
entcs.origin;
295
296 if (entDT)
297 goto updateDT;
298
299
300
301 ++DamageText_screen_count;
302 goto spawnnewDT;
303 }
305 {
306
307 is2d = true;
310
311 if (entDT)
312 goto updateDT;
313
314
316 goto spawnnewDT;
317 }
318 return;
319
321 DamageText_update(entDT, position, is2d,
health, armor, potential_damage, deathtype);
322 return;
323
326 health, armor, potential_damage, deathtype, friendlyfire);
327 return;
328}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
bool autocvar_cl_damagetext
float autocvar_cl_damagetext_2d_close_range
float autocvar_cl_damagetext_accumulate_alpha_rel
bool autocvar_cl_damagetext_2d_out_of_view
vector autocvar_cl_damagetext_2d_pos
float autocvar_cl_damagetext_alpha_start
vector autocvar_cl_damagetext_2d_overlap_offset
int autocvar_cl_damagetext_friendlyfire
bool autocvar_cl_damagetext_2d
IntrusiveList g_damagetext
int spectatee_status
the -1 disables HUD panels before CSQC receives necessary data
const int DTFLAG_BIG_HEALTH
const int DTFLAG_NO_POTENTIAL
const int DTFLAG_BIG_ARMOR
const int DTFLAG_SAMETEAM
const int DTFLAG_BIG_POTENTIAL
const int DTFLAG_NO_ARMOR
#define entcs_receiver(...)
#define IL_EACH(this, cond, body)
noref float vid_conheight
#define make_pure(e)
direct use is
float health
Legacy fields for the resources. To be removed.
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
vector project_3d_to_2d(vector vec)
bool projected_on_screen(vector screen_pos)