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