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
11
12#ifdef GAMEQC
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 for (int j = 0; j < 2; ++j)
27 {
28 if (it.m_projectile[j] == proj)
29 {
30 string trail = it.m_trail[j].eent_eff_name;
31 if (trail) return it.m_trail[j];
32 break;
33 }
34 }
35 });
36
37 return EFFECT_Null;
38}
39
40#endif // GAMEQC
41#ifdef MENUQC
42#include "../hook/hook.qh"
45
46METHOD(MutatorNades, describe, string(MutatorNades this))
47{
48 TC(MutatorNades, this);
50 PAR(_("The %s mutator gives all players offhand nades that can be primed then thrown by pressing %s twice. "
51 "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"));
52 PAR(_("There are multiple types of nades that can be selected, and many configuration options for this mutator, "
53 "so they may act a little differently depending on the server you play on."));
54 PAR(_("This mutator is enabled by default in %s."), COLORED_NAME(MUTATOR_ok));
55 return PAGE_TEXT;
56}
57#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:41
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:48
const int PROJECTILE_NADE
Definition nades.qh:47
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
#define METHOD(cname, name, prototype)
Definition oo.qh:269
#define PAGE_TEXT
Definition string.qh:643
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
Definition string.qh:649
#define PAGE_TEXT_INIT()
Definition string.qh:642
string cvar_cl_pokenade_type
Definition sv_nades.qh:51
string cvar_cl_nade_type
Definition sv_nades.qh:50