Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
nades.qc
Go to the documentation of this file.
1#include "nades.qh"
2
3#include "nade/_mod.qh"
4
5#ifdef SVQC
8#endif
9
10#ifdef GAMEQC
11
13
14REPLICATE(cvar_cl_nade_type, string, "cl_nade_type");
15REPLICATE(cvar_cl_pokenade_type, string, "cl_pokenade_type");
16
17entity Nade_TrailEffect(int proj, int nade_team)
18{
19 switch (proj)
20 {
21 case PROJECTILE_NADE: return EFFECT_NADE_TRAIL(nade_team);
22 case PROJECTILE_NADE_BURN: return EFFECT_NADE_TRAIL_BURN(nade_team);
23 }
24
25 FOREACH(Nades, true,
26 {
27 for (int j = 0; j < 2; ++j)
28 if (it.m_projectile[j] == proj)
29 {
30 if (it.m_trail[j].eent_eff_name)
31 return it.m_trail[j];
32 break;
33 }
34 });
35
36 return EFFECT_Null;
37}
38
39#endif // GAMEQC
40#ifdef MENUQC
41#include "../hook/hook.qh"
44
45METHOD(MutatorNades, describe, string(MutatorNades this))
46{
47 TC(MutatorNades, this);
49 PAR(_("The %s mutator gives all players offhand nades that can be primed then thrown by pressing %s twice. "
50 "If the %s and %s mutators are disabled, they can also be thrown by holding then releasing %s."), COLORED_NAME(this), strcat("^3", _("drop weapon"), "^7"), COLORED_NAME(MUTATOR_offhand_blaster), COLORED_NAME(MUTATOR_hook), strcat("^3", _("hook"), "^7"));
51 PAR(_("There are multiple types of nades that can be selected, and many configuration options for this mutator, "
52 "so they may act a little differently depending on the server you play on."));
53 PAR(_("This mutator is enabled by default in %s."), COLORED_NAME(MUTATOR_ok));
54 return PAGE_TEXT;
55}
56#endif // MENUQC
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define COLORED_NAME(this)
Definition color.qh:195
entity EFFECT_NADE_TRAIL_BURN(int teamid)
Definition effects.inc:42
entity EFFECT_NADE_TRAIL(int teamid)
Definition effects.inc:23
#define FOREACH(list, cond, body)
Definition iter.qh:19
#define TC(T, sym)
Definition _all.inc:82
#define REPLICATE(...)
Replicates a client cvar into a server field.
Definition replicate.qh:23
#define REGISTER_STAT(...)
Definition stats.qh:77
entity Nade_TrailEffect(int proj, int nade_team)
Definition nades.qc:17
bool autocvar_g_nades_nade_small
Definition nades.qc:6
float autocvar_g_nades_spread
Definition nades.qc:7
const int PROJECTILE_NADE_BURN
Definition nades.qh:55
const int PROJECTILE_NADE
Definition nades.qh:54
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
#define METHOD(cname, name, prototype)
Definition oo.qh:269
#define PAGE_TEXT
Definition string.qh:642
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
Definition string.qh:648
#define PAGE_TEXT_INIT()
Definition string.qh:641
string cvar_cl_pokenade_type
Definition sv_nades.qh:51
string cvar_cl_nade_type
Definition sv_nades.qh:50