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(entity item)
27 if(!item.max_armorvalue)
28 item.max_armorvalue = g_pickup_armorsmall_max;
30 item.armorvalue = g_pickup_armorsmall;
34 REGISTER_ITEM(ArmorSmall, Armor) {
35 this.m_canonical_spawnfunc = "item_armor_small";
37 this.m_model = MDL_ArmorSmall_ITEM;
38 this.m_sound = SND_ArmorSmall;
40 this.netname = "armor_small";
41 this.m_name = "5 Armor";
42 this.m_icon = "armor";
44 this.m_itemid = IT_ARMOR_SHARD;
45 this.m_respawntime = GET(g_pickup_respawntime_short);
46 this.m_respawntimejitter = GET(g_pickup_respawntimejitter_short);
47 this.m_pickupanyway = GET(g_pickup_armorsmall_anyway);
48 this.m_iteminit = item_armorsmall_init;
52 SPAWNFUNC_ITEM(item_armor_small, ITEM_ArmorSmall)
55 MODEL(ArmorMedium_ITEM, Item_Model("item_armor_medium.md3"));
56 SOUND(ArmorMedium, Item_Sound("armor10"));
59 PROPERTY(float, g_pickup_armormedium_anyway);
60 PROPERTY(int, g_pickup_armormedium);
61 PROPERTY(int, g_pickup_armormedium_max);
62 void item_armormedium_init(entity item)
64 if(!item.max_armorvalue)
65 item.max_armorvalue = g_pickup_armormedium_max;
67 item.armorvalue = g_pickup_armormedium;
71 REGISTER_ITEM(ArmorMedium, Armor) {
72 this.m_canonical_spawnfunc = "item_armor_medium";
74 this.m_model = MDL_ArmorMedium_ITEM;
75 this.m_sound = SND_ArmorMedium;
77 this.netname = "armor_medium";
78 this.m_name = "25 Armor";
79 this.m_icon = "armor";
81 this.m_itemid = IT_ARMOR;
82 this.m_respawntime = GET(g_pickup_respawntime_medium);
83 this.m_respawntimejitter = GET(g_pickup_respawntimejitter_medium);
84 this.m_pickupanyway = GET(g_pickup_armormedium_anyway);
85 this.m_iteminit = item_armormedium_init;
89 SPAWNFUNC_ITEM(item_armor_medium, ITEM_ArmorMedium)
92 MODEL(ArmorBig_ITEM, Item_Model("item_armor_big.md3"));
93 SOUND(ArmorBig, Item_Sound("armor17_5"));
96 PROPERTY(float, g_pickup_armorbig_anyway);
97 PROPERTY(int, g_pickup_armorbig);
98 PROPERTY(int, g_pickup_armorbig_max);
99 void item_armorbig_init(entity item)
101 if(!item.max_armorvalue)
102 item.max_armorvalue = g_pickup_armorbig_max;
104 item.armorvalue = g_pickup_armorbig;
108 REGISTER_ITEM(ArmorBig, Armor) {
109 this.m_canonical_spawnfunc = "item_armor_big";
111 this.m_model = MDL_ArmorBig_ITEM;
112 this.m_sound = SND_ArmorBig;
114 this.netname = "armor_big";
115 this.m_name = "50 Armor";
116 this.m_icon = "armor";
117 this.m_color = '0 1 0';
118 this.m_waypoint = _("Big armor");
120 this.m_itemid = IT_ARMOR;
121 this.m_respawntime = GET(g_pickup_respawntime_long);
122 this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long);
123 this.m_pickupanyway = GET(g_pickup_armorbig_anyway);
124 this.m_iteminit = item_armorbig_init;
128 SPAWNFUNC_ITEM(item_armor_big, ITEM_ArmorBig)
131 MODEL(ArmorMega_ITEM, Item_Model("item_armor_large.md3"));
132 SOUND(ArmorMega, Item_Sound("armor25"));
135 PROPERTY(float, g_pickup_armormega_anyway);
136 PROPERTY(int, g_pickup_armormega);
137 PROPERTY(int, g_pickup_armormega_max);
138 void item_armormega_init(entity item)
140 if(!item.max_armorvalue)
141 item.max_armorvalue = g_pickup_armormega_max;
143 item.armorvalue = g_pickup_armormega;
147 REGISTER_ITEM(ArmorMega, Armor) {
148 this.m_canonical_spawnfunc = "item_armor_mega";
150 this.m_model = MDL_ArmorMega_ITEM;
151 this.m_sound = SND_ArmorMega;
153 this.netname = "armor_mega";
154 this.m_name = "100 Armor";
155 this.m_icon = "item_large_armor";
156 this.m_color = '0 1 0';
157 this.m_waypoint = _("Mega armor");
158 this.m_waypointblink = 2;
160 this.m_maxs = '16 16 70';
161 this.m_itemid = IT_ARMOR;
162 this.m_respawntime = GET(g_pickup_respawntime_long);
163 this.m_respawntimejitter = GET(g_pickup_respawntimejitter_long);
164 this.m_pickupanyway = GET(g_pickup_armormega_anyway);
165 this.m_iteminit = item_armormega_init;
169 SPAWNFUNC_ITEM(item_armor_mega, ITEM_ArmorMega)