]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/items/item/pickup.qh
Merge branch 'master' into TimePath/effectinfo
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / pickup.qh
1 #ifndef PICKUP_H
2 #define PICKUP_H
3 #include "../item.qh"
4 CLASS(Pickup, GameItem)
5 #ifndef MENUQC
6     ATTRIB(Pickup, m_model, Model, NULL)
7 #endif
8     ATTRIB(Pickup, m_sound, string, "misc/itempickup.wav")
9     ATTRIB(Pickup, m_name, string, string_null)
10     METHOD(Pickup, show, void(entity this));
11     void Pickup_show(entity this) { LOG_INFOF("%s: %s\n", etos(this), this.m_name); }
12 #ifdef SVQC
13     ATTRIB(Pickup, m_botvalue, int, 0)
14     ATTRIB(Pickup, m_itemflags, int, 0)
15     ATTRIB(Pickup, m_itemid, int, 0)
16     ATTRIB(Pickup, m_pickupevalfunc, float(entity player, entity item), generic_pickupevalfunc)
17     ATTRIB(Pickup, m_respawntime, float(), func_null)
18     ATTRIB(Pickup, m_respawntimejitter, float(), func_null)
19     METHOD(Pickup, giveTo, bool(entity this, entity item, entity player));
20     bool Pickup_giveTo(entity this, entity item, entity player) { return Item_GiveTo(item, player); }
21     bool ITEM_HANDLE(Pickup, entity this, entity item, entity player);
22 #endif
23 ENDCLASS(Pickup)
24
25 #ifdef SVQC
26 // For g_pickup_respawntime
27 #include "../../../server/defs.qh"
28 // Getters to dynamically retrieve the values of g_pickup_respawntime*
29 GETTER(float, g_pickup_respawntime_weapon)
30 GETTER(float, g_pickup_respawntime_superweapon)
31 GETTER(float, g_pickup_respawntime_ammo)
32 GETTER(float, g_pickup_respawntime_short)
33 GETTER(float, g_pickup_respawntime_medium)
34 GETTER(float, g_pickup_respawntime_long)
35 GETTER(float, g_pickup_respawntime_powerup)
36 GETTER(float, g_pickup_respawntimejitter_weapon)
37 GETTER(float, g_pickup_respawntimejitter_superweapon)
38 GETTER(float, g_pickup_respawntimejitter_ammo)
39 GETTER(float, g_pickup_respawntimejitter_short)
40 GETTER(float, g_pickup_respawntimejitter_medium)
41 GETTER(float, g_pickup_respawntimejitter_long)
42 GETTER(float, g_pickup_respawntimejitter_powerup)
43
44 #endif
45
46 #endif