]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/item/pickup.qc
LMS and Instagib: fix extralife not counted in the Itemstats panel and wrongly displa...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / pickup.qc
index a3c2d779edcde089ac3d4f7e142693de8e47070b..52cf8c3e8d07af1b933dc5eda7e05a81a518f74d 100644 (file)
@@ -10,12 +10,8 @@ METHOD(Pickup, giveTo, bool(Pickup this, entity item, entity player))
 {
     TC(Pickup, this);
     bool b = Item_GiveTo(item, player);
-    if (b) {
-        //LOG_DEBUGF("entity %i picked up %s", player, this.m_name);
-        entity store = IS_PLAYER(player) ? PS(player) : player;
-        store.inventory.inv_items[this.m_id]++;
-        Inventory_update(store);
-    }
+    if (b)
+        Inventory_pickupitem(this, player);
     return b;
 }