]> 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 b5944fc0a3def7d7235f09bfc66e6ad33f2fb11e..52cf8c3e8d07af1b933dc5eda7e05a81a518f74d 100644 (file)
@@ -10,11 +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);
-        player.inventory.inv_items[this.m_id]++;
-        Inventory_update(player);
-    }
+    if (b)
+        Inventory_pickupitem(this, player);
     return b;
 }