Fix jetpack sound continuing when entering vehicle
[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), healtharmor_pickupevalfunc);
9     ATTRIB(Armor, m_botvalue, int, 3000);
10 #endif
11 ENDCLASS(Armor)
12
13 #ifdef SVQC
14     #include <common/t_items.qh>
15 #endif
16
17 #ifdef GAMEQC
18 MODEL(ArmorSmall_ITEM, Item_Model("item_armor_small.md3"));
19 SOUND(ArmorSmall, Item_Sound("armor1"));
20 #endif
21 #ifdef SVQC
22 PROPERTY(float, g_pickup_armorsmall_anyway);
23 #endif
24
25 REGISTER_ITEM(ArmorSmall, Armor) {
26 #ifdef GAMEQC
27     this.m_model                =   MDL_ArmorSmall_ITEM;
28     this.m_sound                =   SND_ArmorSmall;
29 #endif
30     this.m_name                 =   "5 Armor";
31     this.m_icon                 =   "armor";
32 #ifdef SVQC
33     this.m_itemid               =   IT_ARMOR_SHARD;
34     this.m_respawntime          =   GET(g_pickup_respawntime_short);
35     this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_short);
36     this.m_pickupanyway         =   GET(g_pickup_armorsmall_anyway);
37 #endif
38 }
39
40 #ifdef GAMEQC
41 MODEL(ArmorMedium_ITEM, Item_Model("item_armor_medium.md3"));
42 SOUND(ArmorMedium, Item_Sound("armor10"));
43 #endif
44 #ifdef SVQC
45 PROPERTY(float, g_pickup_armormedium_anyway);
46 #endif
47
48 REGISTER_ITEM(ArmorMedium, Armor) {
49 #ifdef GAMEQC
50     this.m_model                =   MDL_ArmorMedium_ITEM;
51     this.m_sound                =   SND_ArmorMedium;
52 #endif
53     this.m_name                 =   "25 Armor";
54     this.m_icon                 =   "armor";
55 #ifdef SVQC
56     this.m_itemid               =   IT_ARMOR;
57     this.m_respawntime          =   GET(g_pickup_respawntime_medium);
58     this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_medium);
59     this.m_pickupanyway         =   GET(g_pickup_armormedium_anyway);
60 #endif
61 }
62
63 #ifdef GAMEQC
64 MODEL(ArmorBig_ITEM, Item_Model("item_armor_big.md3"));
65 SOUND(ArmorBig, Item_Sound("armor17_5"));
66 #endif
67 #ifdef SVQC
68 PROPERTY(float, g_pickup_armorbig_anyway);
69 #endif
70
71 REGISTER_ITEM(ArmorBig, Armor) {
72 #ifdef GAMEQC
73     this.m_model                =   MDL_ArmorBig_ITEM;
74     this.m_sound                =   SND_ArmorBig;
75 #endif
76     this.m_name                 =   "50 Armor";
77     this.m_icon                 =   "armor";
78     this.m_color                =   '0 1 0';
79     this.m_waypoint             =   _("Big armor");
80 #ifdef SVQC
81     this.m_itemid               =   IT_ARMOR;
82     this.m_respawntime          =   GET(g_pickup_respawntime_long);
83     this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_long);
84     this.m_pickupanyway         =   GET(g_pickup_armorbig_anyway);
85 #endif
86 }
87
88 #ifdef GAMEQC
89 MODEL(ArmorMega_ITEM, Item_Model("item_armor_large.md3"));
90 SOUND(ArmorMega, Item_Sound("armor25"));
91 #endif
92 #ifdef SVQC
93 PROPERTY(float, g_pickup_armormega_anyway);
94 #endif
95
96 REGISTER_ITEM(ArmorMega, Armor) {
97 #ifdef GAMEQC
98     this.m_model                =   MDL_ArmorMega_ITEM;
99     this.m_sound                =   SND_ArmorMega;
100 #endif
101     this.m_name                 =   "100 Armor";
102     this.m_icon                 =   "item_large_armor";
103     this.m_color                =   '0 1 0';
104     this.m_waypoint             =   _("Mega armor");
105     this.m_waypointblink        =   2;
106 #ifdef SVQC
107     this.m_maxs                 =   '16 16 70';
108     this.m_itemid               =   IT_ARMOR;
109     this.m_respawntime          =   GET(g_pickup_respawntime_long);
110     this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_long);
111     this.m_pickupanyway         =   GET(g_pickup_armormega_anyway);
112 #endif
113 }