#ifndef WEAPON_H
#define WEAPON_H
+#include "../items/item/pickup.qh"
+
+const int MAX_WEAPONSLOTS = 2;
.int ammo_shells;
.int ammo_nails;
/** (SERVER) setup weapon data */
METHOD(Weapon, wr_setup, void(Weapon this)) {}
/** (SERVER) logic to run every frame */
- METHOD(Weapon, wr_think, void(Weapon this, entity actor, bool fire1, bool fire2)) {}
+ METHOD(Weapon, wr_think, void(Weapon this, entity actor, int slot, int fire)) {}
/** (SERVER) checks ammo for weapon primary */
METHOD(Weapon, wr_checkammo1, bool(Weapon this)) {return false;}
/** (SERVER) checks ammo for weapon second */
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
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)
CLASS(OffhandWeapon, Object)