]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/items/item/pickup.qh
Items: source name and pickups from item and weapon definitions
[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     ATTRIB(Pickup, m_sound, Sound, SND_ITEMPICKUP)
8 #endif
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_mins, vector, '-16 -16 0')
14     ATTRIB(Pickup, m_maxs, vector, '16 16 32')
15     ATTRIB(Pickup, m_botvalue, int, 0)
16     ATTRIB(Pickup, m_itemflags, int, 0)
17     ATTRIB(Pickup, m_itemid, int, 0)
18     float generic_pickupevalfunc(entity player, entity item);
19     ATTRIB(Pickup, m_pickupevalfunc, float(entity player, entity item), generic_pickupevalfunc)
20     ATTRIB(Pickup, m_respawntime, float(), func_null)
21     ATTRIB(Pickup, m_respawntimejitter, float(), func_null)
22     float Item_GiveTo(entity item, entity player);
23     METHOD(Pickup, giveTo, bool(entity this, entity item, entity player))
24     { return Item_GiveTo(item, player); }
25     bool ITEM_HANDLE(Pickup, entity this, entity item, entity player);
26 #endif
27 ENDCLASS(Pickup)
28
29 #endif