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
string death_msgextra
entity death_msgmurder
entity death_msgself
const int DEATH_WEAPONMASK = BITS(8)
const int DT_FIRST = BIT(14)
const int HITTYPE_ARMORPIERCE = BIT(11)
const int HITTYPE_BOUNCE = BIT(10)
const int HITTYPE_SECONDARY = BIT(8)
const int HITTYPE_SOUND = BIT(12)
const int HITTYPE_SPAM = BIT(13)
const int HITTYPE_SPLASH = BIT(9)

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:37
#define DEATH_ISSPECIAL(t)
Definition all.qh:39
#define NULL
Definition post.qh:14
#define REGISTRY_GET(id, i)
Definition registry.qh:43

Definition at line 41 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 40 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)).death_msgextra == "monster")
string death_msgextra
Definition all.qh:15

Definition at line 44 of file all.qh.

◆ DEATH_ISSPECIAL

◆ DEATH_ISTURRET

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

Definition at line 43 of file all.qh.

Referenced by NET_HANDLE().

◆ DEATH_ISVEHICLE

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

Definition at line 42 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.nent_name = #id; \
this.death_msgextra = 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; \
}
entity death_msgmurder
Definition all.qh:12
entity death_msg_ent_self
Definition all.qh:13
entity death_msgself
Definition all.qh:11
entity death_msg_ent_murder
Definition all.qh:14
int m_id
Definition effect.qh:19
string nent_name
Definition all.qh:681
#define new_pure(class)
purely logical entities (not linked to the area grid)
Definition oo.qh:67
#define REGISTER(...)
Register a new entity with a registry.
Definition registry.qh:87

Definition at line 17 of file all.qh.

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

Function Documentation

◆ Deathtype_Name()

string Deathtype_Name ( int deathtype)

Definition at line 3 of file all.qc.

4{
5 if (DEATH_ISSPECIAL(deathtype)) {
6 entity deathent = REGISTRY_GET(Deathtypes, deathtype - DT_FIRST);
7 if (!deathent) { backtrace("Deathtype_Name: Could not find deathtype entity!\n"); return ""; }
8 return deathent.nent_name;
9 }
10 return ftos(deathtype);
11}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define backtrace(msg)
Definition log.qh:99
string ftos(float f)

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

Referenced by LogDeath(), and Obituary().

Variable Documentation

◆ DEATH_HITTYPEMASK

Definition at line 35 of file all.qh.

◆ death_msg_ent_murder

entity death_msg_ent_murder

Definition at line 14 of file all.qh.

◆ death_msg_ent_self

entity death_msg_ent_self

Definition at line 13 of file all.qh.

◆ death_msgextra

string death_msgextra

Definition at line 15 of file all.qh.

◆ death_msgmurder

entity death_msgmurder

Definition at line 12 of file all.qh.

◆ death_msgself

entity death_msgself

Definition at line 11 of file all.qh.

◆ DEATH_WEAPONMASK

const int DEATH_WEAPONMASK = BITS(8)

Definition at line 28 of file all.qh.

◆ DT_FIRST

const int DT_FIRST = BIT(14)

Definition at line 37 of file all.qh.

Referenced by Deathtype_Name(), and Obituary_SpecialDeath().

◆ HITTYPE_ARMORPIERCE

const int HITTYPE_ARMORPIERCE = BIT(11)

Definition at line 32 of file all.qh.

Referenced by healtharmor_applydamage(), and W_Vortex_Attack().

◆ HITTYPE_BOUNCE

◆ HITTYPE_SECONDARY

◆ HITTYPE_SOUND

const int HITTYPE_SOUND = BIT(12)

Definition at line 33 of file all.qh.

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

◆ HITTYPE_SPAM

const int HITTYPE_SPAM = BIT(13)

◆ HITTYPE_SPLASH