Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
sv_invincibleproj.qc
Go to the documentation of this file.
2
4
7
8MUTATOR_HOOKFUNCTION(invincibleprojectiles, EditProjectile)
9{
10 entity proj = M_ARGV(1, entity);
11
12 if(GetResource(proj, RES_HEALTH))
13 {
14 // disable health which in effect disables damage calculations
15 SetResourceExplicit(proj, RES_HEALTH, 0);
16 }
17}
18
19MUTATOR_HOOKFUNCTION(invincibleprojectiles, BuildMutatorsString)
20{
21 M_ARGV(0, string) = strcat(M_ARGV(0, string), ":InvincibleProjectiles");
22}
23
24MUTATOR_HOOKFUNCTION(invincibleprojectiles, BuildMutatorsPrettyString)
25{
26 M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Invincible Projectiles");
27}
#define MUTATOR_IS_ENABLED(this)
Definition base.qh:237
#define REGISTER_MUTATOR(...)
Definition base.qh:349
#define MUTATOR_HOOKFUNCTION(...)
Definition base.qh:394
#define M_ARGV(idx, type)
Definition base.qh:153
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
ERASEABLE bool expr_evaluate(string s)
Evaluate an expression of the form: [+ | -]?
Definition cvar.qh:48
SetResourceExplicit(ent, RES_ARMOR, ReadByte() *DEC_FACTOR)) ENTCS_PROP(NAME
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
string autocvar_g_invincible_projectiles