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

Go to the source code of this file.

Classes

class  MutatorNades
class  Nade
class  NullNade

Macros

#define NADE_PROJECTILE(i, projectile, trail)
#define REGISTER_NADE(id, inst)

Functions

Nade Nade_FromProjectile (int proj)
 REGISTER (Nades, NADE_TYPE, Null, m_id, NEW(NullNade))
 REGISTER_MUTATOR (nades, true, MutatorNades)
 REPLICATE_INIT (string, cvar_cl_nade_type)
 REPLICATE_INIT (string, cvar_cl_pokenade_type)

Variables

float orb_lifetime
float orb_radius
const int PROJECTILE_NADE = 71
const int PROJECTILE_NADE_BURN = 72

Macro Definition Documentation

◆ NADE_PROJECTILE

#define NADE_PROJECTILE ( i,
projectile,
trail )
Value:
MACRO_BEGIN \
this.m_projectile[i] = projectile; \
this.m_trail[i] = trail; \
#define MACRO_END
Definition macro.qh:7

Definition at line 54 of file nades.qh.

54#define NADE_PROJECTILE(i, projectile, trail) MACRO_BEGIN \
55 this.m_projectile[i] = projectile; \
56 this.m_trail[i] = trail; \
57MACRO_END

Referenced by REGISTER_NADE(), REGISTER_NADE(), REGISTER_NADE(), REGISTER_NADE(), REGISTER_NADE(), REGISTER_NADE(), REGISTER_NADE(), REGISTER_NADE(), REGISTER_NADE(), REGISTER_NADE(), and REGISTER_NADE().

◆ REGISTER_NADE

#define REGISTER_NADE ( id,
inst )
Value:
REGISTER(Nades, NADE_TYPE, id, m_id, inst)
int m_id
Definition effect.qh:19
#define REGISTER(...)
Register a new entity with a registry.
Definition registry.qh:87

Definition at line 12 of file nades.qh.

Function Documentation

◆ Nade_FromProjectile()

Nade Nade_FromProjectile ( int proj)

Definition at line 60 of file nades.qh.

61{
62 FOREACH(Nades, true, {
63 if (it.m_projectile[0] == proj || it.m_projectile[1] == proj) return it;
64 });
65 return NADE_TYPE_Null;
66}
#define FOREACH(list, cond, body)
Definition iter.qh:19

References FOREACH.

Referenced by MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), and Projectile_isnade().

◆ REGISTER()

REGISTER ( Nades ,
NADE_TYPE ,
Null ,
m_id ,
NEW(NullNade)  )

References m_id, NEW, REGISTER, and REGISTRY_DEFINE_GET.

◆ REGISTER_MUTATOR()

REGISTER_MUTATOR ( nades ,
true ,
MutatorNades  )

References REGISTER_MUTATOR, and true.

◆ REPLICATE_INIT() [1/2]

REPLICATE_INIT ( string ,
cvar_cl_nade_type  )

References cvar_cl_nade_type.

◆ REPLICATE_INIT() [2/2]

REPLICATE_INIT ( string ,
cvar_cl_pokenade_type  )

References cvar_cl_pokenade_type.

Variable Documentation

◆ orb_lifetime

float orb_lifetime

Definition at line 70 of file nades.qh.

Referenced by NET_HANDLE(), orb_draw(), orb_draw2d(), and orb_send().

◆ orb_radius

float orb_radius

Definition at line 71 of file nades.qh.

Referenced by NET_HANDLE(), orb_draw(), and orb_send().

◆ PROJECTILE_NADE

const int PROJECTILE_NADE = 71

Definition at line 47 of file nades.qh.

Referenced by MODEL(), Nade_TrailEffect(), and REGISTER_NADE().

◆ PROJECTILE_NADE_BURN

const int PROJECTILE_NADE_BURN = 72

Definition at line 48 of file nades.qh.

Referenced by Nade_TrailEffect(), and REGISTER_NADE().