]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/mutators/mutator_invincibleproj.qc
Merge remote-tracking branch 'origin/master' into terencehill/listbox_item_highlight
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_invincibleproj.qc
1 #include "../_all.qh"
2
3 #include "mutator.qh"
4
5 MUTATOR_HOOKFUNCTION(invincibleprojectiles_EditProjectile)
6 {
7         if(other.health)
8         {
9                 // disable health which in effect disables damage calculations
10                 other.health = 0;
11         }
12         return 0;
13 }
14
15 MUTATOR_HOOKFUNCTION(invincibleprojectiles_BuildMutatorsString)
16 {
17         ret_string = strcat(ret_string, ":InvincibleProjectiles");
18         return 0;
19 }
20
21 MUTATOR_HOOKFUNCTION(invincibleprojectiles_BuildMutatorsPrettyString)
22 {
23         ret_string = strcat(ret_string, ", Invincible Projectiles");
24         return 0;
25 }
26
27 MUTATOR_DEFINITION(mutator_invincibleprojectiles)
28 {
29         MUTATOR_HOOK(EditProjectile, invincibleprojectiles_EditProjectile, CBC_ORDER_ANY);
30         MUTATOR_HOOK(BuildMutatorsString, invincibleprojectiles_BuildMutatorsString, CBC_ORDER_ANY);
31         MUTATOR_HOOK(BuildMutatorsPrettyString, invincibleprojectiles_BuildMutatorsPrettyString, CBC_ORDER_ANY);
32
33         return 0;
34 }