Merge branch 'master' into Mario/vaporizer_damage
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_rocketflying.qc
1 #include "../_all.qh"
2
3 #include "mutator.qh"
4
5 MUTATOR_HOOKFUNCTION(rocketflying_EditProjectile)
6 {
7         if(other.classname == "rocket" || other.classname == "mine")
8         {
9                 // kill detonate delay of rockets
10                 other.spawnshieldtime = time;
11         }
12         return 0;
13 }
14
15 MUTATOR_HOOKFUNCTION(rocketflying_BuildMutatorsString)
16 {
17         ret_string = strcat(ret_string, ":RocketFlying");
18         return 0;
19 }
20
21 MUTATOR_HOOKFUNCTION(rocketflying_BuildMutatorsPrettyString)
22 {
23         ret_string = strcat(ret_string, ", Rocket Flying");
24         return 0;
25 }
26
27 MUTATOR_DEFINITION(mutator_rocketflying)
28 {
29         MUTATOR_HOOK(EditProjectile, rocketflying_EditProjectile, CBC_ORDER_ANY);
30         MUTATOR_HOOK(BuildMutatorsString, rocketflying_BuildMutatorsString, CBC_ORDER_ANY);
31         MUTATOR_HOOK(BuildMutatorsPrettyString, rocketflying_BuildMutatorsPrettyString, CBC_ORDER_ANY);
32
33         return 0;
34 }