]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/items/item/armor.qh
Merge branch 'master' into terencehill/spectatee_status_update
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / armor.qh
1 #pragma once
2
3 #include "pickup.qh"
4 CLASS(Armor, Pickup)
5 #ifdef SVQC
6     ATTRIB(Armor, m_mins, vector, '-16 -16 0');
7     ATTRIB(Armor, m_maxs, vector, '16 16 48');
8     ATTRIB(Armor, m_pickupevalfunc, float(entity player, entity item), commodity_pickupevalfunc);
9 #endif
10 ENDCLASS(Armor)
11
12 #ifdef SVQC
13     #include <common/t_items.qh>
14 #endif
15
16 #ifdef GAMEQC
17 MODEL(ArmorSmall_ITEM, Item_Model("item_armor_small.md3"));
18 SOUND(ArmorSmall, "misc/armor1");
19 #endif
20
21 REGISTER_ITEM(ArmorSmall, Armor) {
22 #ifdef GAMEQC
23     this.m_model                =   MDL_ArmorSmall_ITEM;
24     this.m_sound                =   SND_ArmorSmall;
25 #endif
26     this.m_name                 =   "5 Armor";
27     this.m_icon                 =   "armor";
28 #ifdef SVQC
29     this.m_botvalue             =   BOT_PICKUP_RATING_LOW;
30     this.m_itemid               =   IT_ARMOR_SHARD;
31     this.m_respawntime          =   GET(g_pickup_respawntime_short);
32     this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_short);
33 #endif
34 }
35
36 #ifdef GAMEQC
37 MODEL(ArmorMedium_ITEM, Item_Model("item_armor_medium.md3"));
38 SOUND(ArmorMedium, "misc/armor10");
39 #endif
40
41 REGISTER_ITEM(ArmorMedium, Armor) {
42 #ifdef GAMEQC
43     this.m_model                =   MDL_ArmorMedium_ITEM;
44     this.m_sound                =   SND_ArmorMedium;
45 #endif
46     this.m_name                 =   "25 Armor";
47     this.m_icon                 =   "armor";
48 #ifdef SVQC
49     this.m_botvalue             =   BOT_PICKUP_RATING_MID;
50     this.m_itemid               =   IT_ARMOR;
51     this.m_respawntime          =   GET(g_pickup_respawntime_medium);
52     this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_medium);
53 #endif
54 }
55
56 #ifdef GAMEQC
57 MODEL(ArmorLarge_ITEM, Item_Model("item_armor_big.md3"));
58 SOUND(ArmorLarge, "misc/armor17_5");
59 #endif
60
61 REGISTER_ITEM(ArmorLarge, Armor) {
62 #ifdef GAMEQC
63     this.m_model                =   MDL_ArmorLarge_ITEM;
64     this.m_sound                =   SND_ArmorLarge;
65 #endif
66     this.m_name                 =   "50 Armor";
67     this.m_icon                 =   "armor";
68     this.m_color                =   '0 1 0';
69     this.m_waypoint             =   _("Large armor");
70 #ifdef SVQC
71     this.m_botvalue             =   20000; // FIXME: higher than BOT_PICKUP_RATING_HIGH?
72     this.m_itemid               =   IT_ARMOR;
73     this.m_respawntime          =   GET(g_pickup_respawntime_long);
74     this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_long);
75 #endif
76 }
77
78 #ifdef GAMEQC
79 MODEL(ArmorMega_ITEM, Item_Model("item_armor_large.md3"));
80 SOUND(ArmorMega, "misc/armor25");
81 #endif
82
83 REGISTER_ITEM(ArmorMega, Armor) {
84 #ifdef GAMEQC
85     this.m_model                =   MDL_ArmorMega_ITEM;
86     this.m_sound                =   SND_ArmorMega;
87 #endif
88     this.m_name                 =   "100 Armor";
89     this.m_icon                 =   "item_large_armor";
90     this.m_color                =   '0 1 0';
91     this.m_waypoint             =   _("Mega armor");
92     this.m_waypointblink        =   2;
93 #ifdef SVQC
94     this.m_botvalue             =   BOT_PICKUP_RATING_HIGH;
95     this.m_itemid               =   IT_ARMOR;
96     this.m_respawntime          =   GET(g_pickup_respawntime_long);
97     this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_long);
98 #endif
99 }