Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
all.qh File Reference
#include <common/notifications/all.qh>
#include "all.inc"
Include dependency graph for all.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DEATH_ENT(t)
#define DEATH_IS(t, dt)
#define DEATH_ISMONSTER(t)
#define DEATH_ISSPECIAL(t)
#define DEATH_ISTURRET(t)
#define DEATH_ISVEHICLE(t)
#define DEATH_ISWEAPON(t, w)
#define DEATH_WEAPONOF(t)
#define REGISTER_DEATHTYPE(id, msg_death, msg_death_by, msg_death_ent, msg_death_ent_by, extra)

Functions

string Deathtype_Name (int deathtype)

Variables

const int DEATH_HITTYPEMASK = HITTYPE_SECONDARY | HITTYPE_SPLASH | HITTYPE_BOUNCE | HITTYPE_ARMORPIERCE | HITTYPE_SOUND | HITTYPE_SPAM
entity death_msg_ent_murder
entity death_msg_ent_self
entity death_msgmurder
entity death_msgself
const int DEATH_WEAPONMASK = BITS(8)
const int DT_FIRST = BIT(14)
const int HITTYPE_ARMORPIERCE = BIT(11)
 ignore armor calculations
const int HITTYPE_BOUNCE = BIT(10)
 set manually after projectile has bounced
const int HITTYPE_SECONDARY = BIT(8)
const int HITTYPE_SOUND = BIT(12)
 cause bleeding from ears
const int HITTYPE_SPAM = BIT(13)
 set manually after first RadiusDamage, stops effect spam
const int HITTYPE_SPLASH = BIT(9)
 automatically set by RadiusDamage

Macro Definition Documentation

◆ DEATH_ENT

#define DEATH_ENT ( t)
Value:
(DEATH_ISSPECIAL(t) ? (REGISTRY_GET(Deathtypes, t - DT_FIRST)) : NULL)
const int DT_FIRST
Definition all.qh:39
#define DEATH_ISSPECIAL(t)
Definition all.qh:41
#define NULL
Definition post.qh:14
#define REGISTRY_GET(id, i)
Definition registry.qh:62

Definition at line 43 of file all.qh.

Referenced by MUTATOR_HOOKFUNCTION(), NET_HANDLE(), and Obituary().

◆ DEATH_IS

#define DEATH_IS ( t,
dt )
Value:
(DEATH_ISSPECIAL(t) && (REGISTRY_GET(Deathtypes, t - DT_FIRST)) == dt)

Definition at line 42 of file all.qh.

Referenced by healtharmor_applydamage(), and healtharmor_maxdamage().

◆ DEATH_ISMONSTER

#define DEATH_ISMONSTER ( t)
Value:
(DEATH_ISSPECIAL(t) && (REGISTRY_GET(Deathtypes, t - DT_FIRST)).message == "monster")
string message
Definition powerups.qc:19

Definition at line 46 of file all.qh.

◆ DEATH_ISSPECIAL

◆ DEATH_ISTURRET

#define DEATH_ISTURRET ( t)
Value:
(DEATH_ISSPECIAL(t) && (REGISTRY_GET(Deathtypes, t - DT_FIRST)).message == "turret")

Definition at line 45 of file all.qh.

Referenced by NET_HANDLE().

◆ DEATH_ISVEHICLE

#define DEATH_ISVEHICLE ( t)
Value:
(DEATH_ISSPECIAL(t) && (REGISTRY_GET(Deathtypes, t - DT_FIRST)).message == "vehicle")

Definition at line 44 of file all.qh.

Referenced by NET_HANDLE().

◆ DEATH_ISWEAPON

#define DEATH_ISWEAPON ( t,
w )

◆ DEATH_WEAPONOF

◆ REGISTER_DEATHTYPE

#define REGISTER_DEATHTYPE ( id,
msg_death,
msg_death_by,
msg_death_ent,
msg_death_ent_by,
extra )
Value:
REGISTER(Deathtypes, DEATH, id, m_id, new_pure(deathtype)) \
{ \
this.m_id += DT_FIRST; \
this.m_name = #id; \
this.message = extra; \
this.death_msgself = msg_death; \
this.death_msgmurder = msg_death_by; \
this.death_msg_ent_self = msg_death_ent; \
this.death_msg_ent_murder = msg_death_ent_by; \
}
string m_name
Definition scores.qh:142
entity death_msgmurder
Definition all.qh:14
entity death_msg_ent_self
Definition all.qh:15
entity death_msgself
Definition all.qh:13
entity death_msg_ent_murder
Definition all.qh:16
int m_id
Definition effect.qh:19
#define new_pure(class)
purely logical entities (not linked to the area grid)
Definition oo.qh:66
#define REGISTER(...)
Register a new entity with a registry.
Definition registry.qh:121

Definition at line 18 of file all.qh.

18#define REGISTER_DEATHTYPE(id, msg_death, msg_death_by, msg_death_ent, msg_death_ent_by, extra) \
19 REGISTER(Deathtypes, DEATH, id, m_id, new_pure(deathtype)) \
20 { \
21 this.m_id += DT_FIRST; \
22 this.m_name = #id; \
23 this.message = extra; \
24 this.death_msgself = msg_death; \
25 this.death_msgmurder = msg_death_by; \
26 this.death_msg_ent_self = msg_death_ent; \
27 this.death_msg_ent_murder = msg_death_ent_by; \
28 }

Function Documentation

◆ Deathtype_Name()

string Deathtype_Name ( int deathtype)

Definition at line 3 of file all.qc.

4{
5 if (!DEATH_ISSPECIAL(deathtype))
6 return itos(deathtype);
7
8 entity deathent = REGISTRY_GET(Deathtypes, deathtype - DT_FIRST);
9 if (deathent)
10 return deathent.m_name;
11
12 backtrace("Deathtype_Name: Could not find deathtype entity!\n");
13 return "";
14}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define itos(i)
Definition int.qh:6
#define backtrace(msg)
Definition log.qh:96

References backtrace, DEATH_ISSPECIAL, DT_FIRST, entity(), itos, and REGISTRY_GET.

Referenced by LogDeath(), and Obituary().

Variable Documentation

◆ DEATH_HITTYPEMASK

Definition at line 37 of file all.qh.

◆ death_msg_ent_murder

entity death_msg_ent_murder

Definition at line 16 of file all.qh.

◆ death_msg_ent_self

entity death_msg_ent_self

Definition at line 15 of file all.qh.

◆ death_msgmurder

entity death_msgmurder

Definition at line 14 of file all.qh.

◆ death_msgself

entity death_msgself

Definition at line 13 of file all.qh.

◆ DEATH_WEAPONMASK

const int DEATH_WEAPONMASK = BITS(8)

Definition at line 30 of file all.qh.

◆ DT_FIRST

const int DT_FIRST = BIT(14)

Definition at line 39 of file all.qh.

Referenced by Deathtype_Name(), and Obituary_SpecialDeath().

◆ HITTYPE_ARMORPIERCE

const int HITTYPE_ARMORPIERCE = BIT(11)

ignore armor calculations

Definition at line 34 of file all.qh.

Referenced by healtharmor_applydamage(), and W_Vortex_Attack().

◆ HITTYPE_BOUNCE

◆ HITTYPE_SECONDARY

◆ HITTYPE_SOUND

const int HITTYPE_SOUND = BIT(12)

cause bleeding from ears

Definition at line 35 of file all.qh.

Referenced by Damage(), PlayerDamage(), RadiusDamageForSource(), and W_Tuba_NoteOn().

◆ HITTYPE_SPAM

const int HITTYPE_SPAM = BIT(13)

set manually after first RadiusDamage, stops effect spam

Definition at line 36 of file all.qh.

Referenced by Damage(), RadiusDamageForSource(), W_Electro_ExplodeComboThink(), and W_Hook_ExplodeThink().

◆ HITTYPE_SPLASH