]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/mutators/mutator_invincibleproj.qc
Mutators: port to new syntax
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_invincibleproj.qc
1
2 #include "mutator.qh"
3
4 REGISTER_MUTATOR(invincibleprojectiles, cvar("g_invincible_projectiles"));
5
6 MUTATOR_HOOKFUNCTION(invincibleprojectiles, EditProjectile)
7 {
8         if(other.health)
9         {
10                 // disable health which in effect disables damage calculations
11                 other.health = 0;
12         }
13         return 0;
14 }
15
16 MUTATOR_HOOKFUNCTION(invincibleprojectiles, BuildMutatorsString)
17 {
18         ret_string = strcat(ret_string, ":InvincibleProjectiles");
19         return 0;
20 }
21
22 MUTATOR_HOOKFUNCTION(invincibleprojectiles, BuildMutatorsPrettyString)
23 {
24         ret_string = strcat(ret_string, ", Invincible Projectiles");
25         return 0;
26 }