Merge branch 'master' into DefaultUser/armormega
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / health.qh
1 #pragma once
2
3 #include "pickup.qh"
4 CLASS(Health, Pickup)
5 #ifdef SVQC
6     ATTRIB(Health, m_mins, vector, '-16 -16 0');
7     ATTRIB(Health, m_maxs, vector, '16 16 48');
8     ATTRIB(Health, m_pickupevalfunc, float(entity player, entity item), commodity_pickupevalfunc);
9 #endif
10 ENDCLASS(Health)
11
12 #ifdef SVQC
13     #include <common/t_items.qh>
14 #endif
15
16 #ifdef GAMEQC
17 MODEL(HealthSmall_ITEM, Item_Model("g_h1.md3"));
18 SOUND(HealthSmall, "misc/minihealth");
19 #endif
20
21 REGISTER_ITEM(HealthSmall, Health) {
22 #ifdef GAMEQC
23     this.m_model                =   MDL_HealthSmall_ITEM;
24     this.m_sound                =   SND_HealthSmall;
25 #endif
26     this.m_name                 =   "5 Health";
27     this.m_icon                 =   "health";
28 #ifdef SVQC
29     this.m_botvalue             =   BOT_PICKUP_RATING_LOW;
30     this.m_itemid               =   IT_5HP;
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(HealthMedium_ITEM, Item_Model("g_h25.md3"));
38 SOUND(HealthMedium, "misc/mediumhealth");
39 #endif
40
41 REGISTER_ITEM(HealthMedium, Health) {
42 #ifdef GAMEQC
43     this.m_model                =   MDL_HealthMedium_ITEM;
44     this.m_sound                =   SND_HealthMedium;
45 #endif
46     this.m_name                 =   "25 Health";
47     this.m_icon                 =   "health";
48 #ifdef SVQC
49     this.m_botvalue             =   BOT_PICKUP_RATING_MID;
50     this.m_itemid               =   IT_25HP;
51     this.m_respawntime          =   GET(g_pickup_respawntime_short);
52     this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_short);
53 #endif
54 }
55
56 #ifdef GAMEQC
57 MODEL(HealthBig_ITEM, Item_Model("g_h50.md3"));
58 SOUND(HealthBig, "misc/mediumhealth");
59 #endif
60
61 REGISTER_ITEM(HealthBig, Health) {
62 #ifdef GAMEQC
63     this.m_model                =   MDL_HealthBig_ITEM;
64     this.m_sound                =   SND_HealthBig;
65 #endif
66     this.m_name                 =   "50 Health";
67     this.m_icon                 =   "health";
68     this.m_color                =   '1 0 0';
69     this.m_waypoint             =   _("Big health");
70 #ifdef SVQC
71     this.m_botvalue             =   BOT_PICKUP_RATING_MID;
72     this.m_itemid               =   IT_25HP;
73     this.m_respawntime          =   GET(g_pickup_respawntime_medium);
74     this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_medium);
75 #endif
76 }
77
78 #ifdef GAMEQC
79 MODEL(HealthMega_ITEM, Item_Model("g_h100.md3"));
80 SOUND(HealthMega, "misc/megahealth");
81 #endif
82
83 REGISTER_ITEM(HealthMega, Health) {
84 #ifdef GAMEQC
85     this.m_model                =   MDL_HealthMega_ITEM;
86     this.m_sound                =   SND_HealthMega;
87 #endif
88     this.m_name                 =   "100 Health";
89     this.m_icon                 =   "item_mega_health";
90     this.m_color                =   '1 0 0';
91     this.m_waypoint             =   _("Mega health");
92     this.m_waypointblink        =   2;
93 #ifdef SVQC
94     this.m_maxs                 =   '16 16 70';
95     this.m_botvalue             =   BOT_PICKUP_RATING_HIGH;
96     this.m_itemid               =   IT_HEALTH;
97     this.m_respawntime          =   GET(g_pickup_respawntime_long);
98     this.m_respawntimejitter    =   GET(g_pickup_respawntimejitter_long);
99 #endif
100 }