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
5
6MUTATOR_HOOKFUNCTION(invincibleprojectiles, EditProjectile)
7{
8 entity proj = M_ARGV(1, entity);
9
10 if(GetResource(proj, RES_HEALTH))
11 {
12 // disable health which in effect disables damage calculations
13 SetResourceExplicit(proj, RES_HEALTH, 0);
14 }
15}
16
17MUTATOR_HOOKFUNCTION(invincibleprojectiles, BuildMutatorsString)
18{
19 M_ARGV(0, string) = strcat(M_ARGV(0, string), ":InvincibleProjectiles");
20}
21
22MUTATOR_HOOKFUNCTION(invincibleprojectiles, BuildMutatorsPrettyString)
23{
24 M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Invincible Projectiles");
25}
#define REGISTER_MUTATOR(...)
Definition base.qh:295
#define MUTATOR_HOOKFUNCTION(...)
Definition base.qh:335
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.
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
#define M_ARGV(x, type)
Definition events.qh:17
ERASEABLE bool expr_evaluate(string s)
Evaluate an expression of the form: [+ | -]?
Definition cvar.qh:48
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
string autocvar_g_invincible_projectiles