+#include <common/items/all.qh>
+CLASS(WeaponPickup, Pickup)
+ ATTRIB(WeaponPickup, m_weapon, Weapon, NULL)
+ ATTRIB(WeaponPickup, m_name, string, string_null)
+#ifndef MENUQC
+ ATTRIB(WeaponPickup, m_sound, Sound, SND_WEAPONPICKUP)
+#endif
+#ifdef SVQC
+ ATTRIB(WeaponPickup, m_itemflags, int, FL_WEAPON)
+ float weapon_pickupevalfunc(entity player, entity item);
+ ATTRIB(WeaponPickup, m_pickupevalfunc, float(entity player, entity item), weapon_pickupevalfunc)
+#endif
+ CONSTRUCTOR(WeaponPickup, Weapon w) {
+ CONSTRUCT(WeaponPickup);
+ this.m_weapon = w;
+ this.m_name = w.m_name;
+#ifndef MENUQC
+ this.m_model = w.m_model;
+#endif
+#ifdef SVQC
+ this.m_botvalue = w.bot_pickupbasevalue;
+#endif
+ }
+#ifdef SVQC
+ METHOD(WeaponPickup, giveTo, bool(entity this, entity item, entity player))
+ {
+ bool b = Item_GiveTo(item, player);
+ if (b) {
+ LOG_TRACEF("entity %i picked up %s\n", player, this.m_name);
+ }
+ return b;
+ }
+#endif
+ENDCLASS(WeaponPickup)
+