Xonotic
pickup.qh
Go to the documentation of this file.
1 #pragma once
2 
3 #ifdef SVQC
4 PROPERTY(float, g_pickup_respawntime_weapon)
5 PROPERTY(float, g_pickup_respawntime_superweapon)
6 PROPERTY(float, g_pickup_respawntime_ammo)
7 PROPERTY(float, g_pickup_respawntime_short)
8 PROPERTY(float, g_pickup_respawntime_medium)
9 PROPERTY(float, g_pickup_respawntime_long)
10 PROPERTY(float, g_pickup_respawntime_powerup)
11 PROPERTY(float, g_pickup_respawntimejitter_weapon)
12 PROPERTY(float, g_pickup_respawntimejitter_superweapon)
13 PROPERTY(float, g_pickup_respawntimejitter_ammo)
14 PROPERTY(float, g_pickup_respawntimejitter_short)
15 PROPERTY(float, g_pickup_respawntimejitter_medium)
16 PROPERTY(float, g_pickup_respawntimejitter_long)
17 PROPERTY(float, g_pickup_respawntimejitter_powerup)
18 #endif
19 
20 #include <common/items/item.qh>
21 
23 #ifdef GAMEQC
24  ATTRIB(Pickup, m_model, Model);
25  ATTRIB(Pickup, m_skin, int);
26  ATTRIB(Pickup, m_color, vector);
27  ATTRIB(Pickup, m_sound, Sound, SND_ITEMPICKUP);
28 #endif
29  ATTRIB(Pickup, netname, string);
30  ATTRIB(Pickup, m_name, string);
31  METHOD(Pickup, show, void(Pickup this))
32  {
33  TC(Pickup, this);
34  LOG_INFOF("%s: %s", etos(this), this.m_name);
35  }
36  ATTRIB(Pickup, m_itemid, int, 0);
37 #ifdef SVQC
38  ATTRIB(Pickup, m_mins, vector, '-16 -16 0');
39  ATTRIB(Pickup, m_maxs, vector, '16 16 48');
40  ATTRIB(Pickup, m_botvalue, int, 0);
41  ATTRIB(Pickup, m_itemflags, int, 0);
42  float generic_pickupevalfunc(entity player, entity item);
43  ATTRIB(Pickup, m_pickupevalfunc, float(entity player, entity item), generic_pickupevalfunc);
44  ATTRIB(Pickup, m_respawntime, float());
45  ATTRIB(Pickup, m_respawntimejitter, float());
46  ATTRIB(Pickup, m_pickupanyway, float());
47  ATTRIB(Pickup, m_iteminit, void(Pickup this, entity item));
48  float Item_GiveTo(entity item, entity player);
49  METHOD(Pickup, giveTo, bool(Pickup this, entity item, entity player));
50  bool ITEM_HANDLE(Pickup, Pickup this, entity item, entity player);
51 #endif
CLASS(Object) Object
Definition: oo.qh:318
entity() spawn
string netname
Definition: powerups.qc:20
int m_itemid
Definition: jetpack.qh:11
float generic_pickupevalfunc(entity player, entity item)
Definition: items.qc:797
Definition: pickup.qh:22
#define METHOD(cname, name, prototype)
Definition: oo.qh:257
#define ATTRIB(...)
Definition: oo.qh:136
#define LOG_INFOF(...)
Definition: log.qh:71
Definition: model.qh:3
#define TC(T, sym)
Definition: _all.inc:82
Definition: sound.qh:119
vector(float skel, float bonenum) _skel_get_boneabs_hidden
#define PROPERTY(type, name)
Definition: misc.qh:36
#define ITEM_HANDLE(signal,...)
Definition: item.qh:103
#define ENDCLASS(cname)
Definition: oo.qh:269
bool Item_GiveTo(entity item, entity player)
Definition: items.qc:479
string m_name
Definition: scores.qh:135