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), healtharmor_pickupevalfunc);
9 ATTRIB(Armor, m_botvalue, int, 5000);
14 #include <common/t_items.qh>
18 MODEL(ArmorSmall_ITEM, Item_Model("item_armor_small.md3"));
19 SOUND(ArmorSmall, Item_Sound("armor1"));
22 PROPERTY(float, g_pickup_armorsmall_anyway);
23 PROPERTY(int, g_pickup_armorsmall);
24 PROPERTY(int, g_pickup_armorsmall_max);
25 void item_armorsmall_init(Pickup this, entity item)
27 if(!item.max_armorvalue)
28 item.max_armorvalue = g_pickup_armorsmall_max;
29 if(!GetResource(item, RES_ARMOR))
30 SetResourceExplicit(item, RES_ARMOR, g_pickup_armorsmall);
34 REGISTER_ITEM(ArmorSmall, Armor) {
35 this.m_canonical_spawnfunc = "item_armor_small";
37 this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
38 this.m_model = MDL_ArmorSmall_ITEM;
39 this.m_sound = SND_ArmorSmall;
41 this.netname = "armor_small";
42 this.m_name = _("Small armor");
43 this.m_icon = "armor";
45 this.m_itemid = IT_ARMOR_SHARD;
46 this.m_respawntime = GET(g_pickup_respawntime_short);
47 this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short);
48 this.m_pickupanyway = GET(g_pickup_armorsmall_anyway);
49 this.m_iteminit = item_armorsmall_init;
53 SPAWNFUNC_ITEM(item_armor_small, ITEM_ArmorSmall)
56 MODEL(ArmorMedium_ITEM, Item_Model("item_armor_medium.md3"));
57 SOUND(ArmorMedium, Item_Sound("armor10"));
60 PROPERTY(float, g_pickup_armormedium_anyway);
61 PROPERTY(int, g_pickup_armormedium);
62 PROPERTY(int, g_pickup_armormedium_max);
63 void item_armormedium_init(Pickup this, entity item)
65 if(!item.max_armorvalue)
66 item.max_armorvalue = g_pickup_armormedium_max;
67 if(!GetResource(item, RES_ARMOR))
68 SetResourceExplicit(item, RES_ARMOR, g_pickup_armormedium);
72 REGISTER_ITEM(ArmorMedium, Armor) {
73 this.m_canonical_spawnfunc = "item_armor_medium";
75 this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
76 this.m_model = MDL_ArmorMedium_ITEM;
77 this.m_sound = SND_ArmorMedium;
79 this.netname = "armor_medium";
80 this.m_name = _("Medium armor");
81 this.m_icon = "armor";
83 this.m_itemid = IT_ARMOR;
84 this.m_respawntime = GET(g_pickup_respawntime_medium);
85 this.m_respawntimejitter = GET(g_pickup_respawntimejitter_medium);
86 this.m_pickupanyway = GET(g_pickup_armormedium_anyway);
87 this.m_iteminit = item_armormedium_init;
91 SPAWNFUNC_ITEM(item_armor_medium, ITEM_ArmorMedium)
94 MODEL(ArmorBig_ITEM, Item_Model("item_armor_big.md3"));
95 SOUND(ArmorBig, Item_Sound("armor17_5"));
98 PROPERTY(float, g_pickup_armorbig_anyway);
99 PROPERTY(int, g_pickup_armorbig);
100 PROPERTY(int, g_pickup_armorbig_max);
101 void item_armorbig_init(Pickup this, entity item)
103 if(!item.max_armorvalue)
104 item.max_armorvalue = g_pickup_armorbig_max;
105 if(!GetResource(item, RES_ARMOR))
106 SetResourceExplicit(item, RES_ARMOR, g_pickup_armorbig);
110 REGISTER_ITEM(ArmorBig, Armor) {
111 this.m_canonical_spawnfunc = "item_armor_big";
113 this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
114 this.m_model = MDL_ArmorBig_ITEM;
115 this.m_sound = SND_ArmorBig;
117 this.netname = "armor_big";
118 this.m_name = _("Big armor");
119 this.m_icon = "armor";
120 this.m_color = '0 1 0';
121 this.m_waypoint = _("Big armor");
123 this.m_itemid = IT_ARMOR;
124 this.m_respawntime = GET(g_pickup_respawntime_long);
125 this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long);
126 this.m_pickupanyway = GET(g_pickup_armorbig_anyway);
127 this.m_iteminit = item_armorbig_init;
131 SPAWNFUNC_ITEM(item_armor_big, ITEM_ArmorBig)
134 MODEL(ArmorMega_ITEM, Item_Model("item_armor_large.md3"));
135 SOUND(ArmorMega, Item_Sound("armor25"));
138 PROPERTY(float, g_pickup_armormega_anyway);
139 PROPERTY(int, g_pickup_armormega);
140 PROPERTY(int, g_pickup_armormega_max);
141 void item_armormega_init(Pickup this, entity item)
143 if(!item.max_armorvalue)
144 item.max_armorvalue = g_pickup_armormega_max;
145 if(!GetResource(item, RES_ARMOR))
146 SetResourceExplicit(item, RES_ARMOR, g_pickup_armormega);
150 REGISTER_ITEM(ArmorMega, Armor) {
151 this.m_canonical_spawnfunc = "item_armor_mega";
153 this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
154 this.m_model = MDL_ArmorMega_ITEM;
155 this.m_sound = SND_ArmorMega;
157 this.netname = "armor_mega";
158 this.m_name = _("Mega armor");
159 this.m_icon = "item_large_armor";
160 this.m_color = '0 1 0';
161 this.m_waypoint = _("Mega armor");
162 this.m_waypointblink = 2;
164 this.m_maxs = '16 16 70';
165 this.m_itemid = IT_ARMOR;
166 this.m_respawntime = GET(g_pickup_respawntime_long);
167 this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long);
168 this.m_pickupanyway = GET(g_pickup_armormega_anyway);
169 this.m_iteminit = item_armormega_init;
173 SPAWNFUNC_ITEM(item_armor_mega, ITEM_ArmorMega)