]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/mutators/mutator_instagib_items.qc
40340b172323926540cf91313ce7fa5f2d00f201
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_instagib_items.qc
1 #include "../../common/items/item.qh"
2
3 #define WITH(it) this.m_##it;
4 #define CONFIGURE(...) MAP(WITH, __VA_ARGS__)
5
6 float instagib_respawntime_ammo = 45;
7 float instagib_respawntimejitter_ammo = 0;
8 GETTER(float, instagib_respawntime_ammo)
9 GETTER(float, instagib_respawntimejitter_ammo)
10
11 REGISTER_ITEM(VaporizerCells, Pickup, APPLY(UNWORDS
12     ,APPLY(CONFIGURE
13     ,   model               =   "models/items/a_cells.md3"
14     ,   sound               =   "misc/itempickup.wav"
15     ,   name                =   "Vaporizer Ammo"
16     )
17     ,IF(SV, CONFIGURE
18     ,   botvalue            =   100
19     ,   itemid              =   IT_CELLS
20     ,   respawntime         =         GET(instagib_respawntime_ammo)
21     ,   respawntimejitter   =   GET(instagib_respawntimejitter_ammo)
22     )
23 ))
24
25 REGISTER_ITEM(ExtraLife, Pickup, APPLY(UNWORDS
26     ,APPLY(CONFIGURE
27     ,   model               =   "models/items/g_h100.md3"
28     ,   sound               =   "misc/megahealth.wav"
29     ,   name                =   "Extralife"
30     )
31     ,IF(SV, CONFIGURE
32     ,   botvalue            =   BOT_PICKUP_RATING_HIGH
33     ,   itemflags           =   FL_POWERUP
34     ,   itemid              =   IT_NAILS
35     ,   respawntime         =         GET(g_pickup_respawntime_powerup)
36     ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_powerup)
37     )
38 ))
39
40 #undef WITH
41 #undef CONFIGURE