Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
sv_invincibleproj.qc File Reference
Include dependency graph for sv_invincibleproj.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 MUTATOR_HOOKFUNCTION (invincibleprojectiles, BuildMutatorsPrettyString)
 MUTATOR_HOOKFUNCTION (invincibleprojectiles, BuildMutatorsString)
 MUTATOR_HOOKFUNCTION (invincibleprojectiles, EditProjectile)
 REGISTER_MUTATOR (invincibleprojectiles, expr_evaluate(autocvar_g_invincible_projectiles))

Variables

string autocvar_g_invincible_projectiles

Function Documentation

◆ MUTATOR_HOOKFUNCTION() [1/3]

MUTATOR_HOOKFUNCTION ( invincibleprojectiles ,
BuildMutatorsPrettyString  )

Definition at line 22 of file sv_invincibleproj.qc.

23{
24 M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Invincible Projectiles");
25}
#define M_ARGV(x, type)
Definition events.qh:17
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))

References M_ARGV, and strcat().

◆ MUTATOR_HOOKFUNCTION() [2/3]

MUTATOR_HOOKFUNCTION ( invincibleprojectiles ,
BuildMutatorsString  )

Definition at line 17 of file sv_invincibleproj.qc.

18{
19 M_ARGV(0, string) = strcat(M_ARGV(0, string), ":InvincibleProjectiles");
20}

References M_ARGV, and strcat().

◆ MUTATOR_HOOKFUNCTION() [3/3]

MUTATOR_HOOKFUNCTION ( invincibleprojectiles ,
EditProjectile  )

Definition at line 6 of file sv_invincibleproj.qc.

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}
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.

References entity(), GetResource(), M_ARGV, and SetResourceExplicit().

◆ REGISTER_MUTATOR()

REGISTER_MUTATOR ( invincibleprojectiles ,
expr_evaluate(autocvar_g_invincible_projectiles)  )

Variable Documentation

◆ autocvar_g_invincible_projectiles

string autocvar_g_invincible_projectiles

Definition at line 3 of file sv_invincibleproj.qc.

Referenced by REGISTER_MUTATOR().