]> 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 fc958709e87d66af6eb50b958ce71ab8ef8f11b2..52cf8c3e8d07af1b933dc5eda7e05a81a518f74d 100644 (file)
@@ -1,7 +1,18 @@
 #include "pickup.qh"
+#include <common/items/inventory.qh>
 
 #ifdef SVQC
 bool ITEM_HANDLE(Pickup, entity this, entity item, entity player) {
     return this.giveTo(this, item, player);
 }
+
+METHOD(Pickup, giveTo, bool(Pickup this, entity item, entity player))
+{
+    TC(Pickup, this);
+    bool b = Item_GiveTo(item, player);
+    if (b)
+        Inventory_pickupitem(this, player);
+    return b;
+}
+
 #endif