]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/items/item/health.qc
Use the new item system for health and armor
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / health.qc
1 #include "health.qh"
2 #include "../../../server/t_items.qh"
3
4 #define REGISTER_HEALTH(id, model, sound, resp, name, itemid, botvalue) \
5 REGISTER_ITEM(id, Health, LAMBDA({                                      \
6     this.m_model = model;                                               \
7     this.m_sound = sound;                                               \
8     this.m_respawntime = resp;                                          \
9     this.m_respawntimejitter = resp;                                    \
10     this.m_name = name;                                                 \
11     this.m_itemid = itemid;                                             \
12     this.m_botvalue = botvalue;                                         \
13 }))
14
15 REGISTER_HEALTH(HealthSmall
16     , "models/items/g_h1.md3"
17     , "misc/minihealth.wav"
18     , SPAWNTIME_SHORT
19     , "5 Health"
20     , IT_5HP
21     , BOT_PICKUP_RATING_LOW
22 )
23
24 REGISTER_HEALTH(HealthMedium
25     , "models/items/g_h25.md3"
26     , "misc/mediumhealth.wav"
27     , SPAWNTIME_SHORT
28     , "25 Health"
29     , IT_25HP
30     , BOT_PICKUP_RATING_MID
31 )
32
33 REGISTER_HEALTH(HealthLarge
34     , "models/items/g_h50.md3"
35     , "misc/mediumhealth.wav"
36     , SPAWNTIME_MEDIUM
37     , "50 Health"
38     , IT_25HP
39     , BOT_PICKUP_RATING_MID
40 )
41
42 REGISTER_HEALTH(HealthMega
43     , "models/items/g_h100.md3"
44     , "misc/megahealth.wav"
45     , SPAWNTIME_LONG
46     , "100 Health"
47     , IT_HEALTH
48     , BOT_PICKUP_RATING_HIGH
49 )