2 #include <common/items/inventory.qh>
5 bool ITEM_HANDLE(Pickup, entity this, entity item, entity player) {
6 return this.giveTo(this, item, player);
9 METHOD(Pickup, giveTo, bool(Pickup this, entity item, entity player))
12 bool b = Item_GiveTo(item, player);
14 //LOG_DEBUGF("entity %i picked up %s", player, this.m_name);
15 entity store = IS_PLAYER(player) ? PS(player) : player;
16 store.inventory.inv_items[this.m_id]++;
17 Inventory_update(store);