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

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 60 of file nades.qh.

60#define NADE_PROJECTILE(i, projectile, trail) MACRO_BEGIN \
61 this.m_projectile[i] = projectile; \
62 this.m_trail[i] = trail; \
63MACRO_END

◆ 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 65 of file nades.qh.

66{
67 FOREACH(Nades, it.m_projectile[0] == proj || it.m_projectile[1] == proj, return it);
68 return NADE_TYPE_Null;
69}
#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

◆ PROJECTILE_NADE

const int PROJECTILE_NADE = 71

Definition at line 54 of file nades.qh.

Referenced by MODEL(), and Nade_TrailEffect().

◆ PROJECTILE_NADE_BURN

const int PROJECTILE_NADE_BURN = 72

Definition at line 55 of file nades.qh.

Referenced by NADE_PROJECTILE(), and Nade_TrailEffect().