Xonotic
sv_invincibleproj.qc File Reference
+ Include dependency graph for sv_invincibleproj.qc:

Go to the source code of this file.

Functions

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

Variables

string autocvar_g_invincible_projectiles
 

Function Documentation

◆ MUTATOR_HOOKFUNCTION() [1/3]

MUTATOR_HOOKFUNCTION ( invincibleprojectiles  ,
EditProjectile   
)

Definition at line 6 of file sv_invincibleproj.qc.

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

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
14  }
15 }
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
Definition: cl_resources.qc:15
entity() spawn
RES_HEALTH
Definition: ent_cs.qc:126
#define M_ARGV(x, type)
Definition: events.qh:17
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
Definition: cl_resources.qc:10
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [2/3]

MUTATOR_HOOKFUNCTION ( invincibleprojectiles  ,
BuildMutatorsString   
)

Definition at line 17 of file sv_invincibleproj.qc.

References M_ARGV, and strcat().

18 {
19  M_ARGV(0, string) = strcat(M_ARGV(0, string), ":InvincibleProjectiles");
20 }
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
#define M_ARGV(x, type)
Definition: events.qh:17
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [3/3]

MUTATOR_HOOKFUNCTION ( invincibleprojectiles  ,
BuildMutatorsPrettyString   
)

Definition at line 22 of file sv_invincibleproj.qc.

References M_ARGV, and strcat().

23 {
24  M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Invincible Projectiles");
25 }
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
#define M_ARGV(x, type)
Definition: events.qh:17
+ Here is the call graph for this function:

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