]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mutators/mutator/instagib/sv_instagib.qh
Merge branch 'master' into Mario/csqc_muzzleflash
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / instagib / sv_instagib.qh
1 #pragma once
2
3 #include "items.qh"
4 #include <common/gamemodes/_mod.qh>
5
6 float autocvar_g_instagib_invis_alpha;
7 int autocvar_g_instagib_extralives;
8
9 void instagib_invisibility(entity this);
10 void instagib_extralife(entity this);
11 void instagib_speed(entity this);
12
13 REGISTER_MUTATOR(mutator_instagib, autocvar_g_instagib && !g_nexball)
14 {
15         MUTATOR_ONADD
16         {
17                 ITEM_VaporizerCells.spawnflags &= ~ITEM_FLAG_MUTATORBLOCKED;
18                 ITEM_Invisibility.spawnflags &= ~ITEM_FLAG_MUTATORBLOCKED;
19                 ITEM_Speed.spawnflags &= ~ITEM_FLAG_MUTATORBLOCKED;
20         }
21         MUTATOR_ONROLLBACK_OR_REMOVE
22         {
23                 ITEM_VaporizerCells.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
24                 ITEM_Invisibility.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
25                 ITEM_Speed.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
26         }
27 }