]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/items/item/armor.qc
Fix items not respawning
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / armor.qc
1 #include "armor.qh"
2 #include "../../../server/t_items.qh"
3
4 #define WITH(it) this.m_##it;
5 #define CONFIGURE(...) MAP(WITH, __VA_ARGS__)
6 #define DEFINE(id, ...) REGISTER_ITEM(id, Armor, MAP(IDENTITY, __VA_ARGS__))
7
8 DEFINE(ArmorSmall
9     ,IF(ALL, CONFIGURE
10     ,   model               =   "models/items/item_armor_small.md3"
11     ,   sound               =   "misc/armor1.wav"
12     ,   name                =   "5 Armor"
13     ,   itemid              =   IT_ARMOR_SHARD
14     )
15     ,IF(SV, CONFIGURE
16     ,   botvalue            =   BOT_PICKUP_RATING_LOW
17     ,   respawntime         =         GET(g_pickup_respawntime_short)
18     ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_short)
19     )
20 )
21
22 DEFINE(ArmorMedium
23     ,IF(ALL, CONFIGURE
24     ,   model               =   "models/items/item_armor_medium.md3"
25     ,   sound               =   "misc/armor10.wav"
26     ,   name                =   "25 Armor"
27     ,   itemid              =   IT_ARMOR
28     )
29     ,IF(SV, CONFIGURE
30     ,   botvalue            =   BOT_PICKUP_RATING_MID
31     ,   respawntime         =         GET(g_pickup_respawntime_medium)
32     ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_medium)
33     )
34 )
35
36 DEFINE(ArmorBig
37     ,IF(ALL, CONFIGURE
38     ,   model               =   "models/items/item_armor_big.md3"
39     ,   sound               =   "misc/armor17_5.wav"
40     ,   name                =   "50 Armor"
41     ,   itemid              =   IT_ARMOR
42     )
43     ,IF(SV, CONFIGURE
44     ,   botvalue            =   20000 // FIXME: higher than BOT_PICKUP_RATING_HIGH?
45     ,   respawntime         =         GET(g_pickup_respawntime_long)
46     ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_long)
47     )
48 )
49
50 DEFINE(ArmorLarge
51     ,IF(ALL, CONFIGURE
52     ,   model               =   "models/items/item_armor_large.md3"
53     ,   sound               =   "misc/armor25.wav"
54     ,   name                =   "100 Armor"
55     ,   itemid              =   IT_ARMOR
56     )
57     ,IF(SV, CONFIGURE
58     ,   botvalue            =   BOT_PICKUP_RATING_HIGH
59     ,   respawntime         =         GET(g_pickup_respawntime_long)
60     ,   respawntimejitter   =   GET(g_pickup_respawntimejitter_long)
61     )
62 )
63
64 #undef WITH
65 #undef CONFIGURE
66 #undef DEFINE