]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/inventory.qh
Explicitly enable sv_gameplayfix_unstickplayers
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / inventory.qh
index 6f6ebdc452a9f768b2626fc5aecf00e9f054876c..118b7079d0c832303ae7aa563172515fea190273 100644 (file)
@@ -154,9 +154,18 @@ void Inventory_new(PlayerState this)
        inv.owner = this;
        Net_LinkEntity(inv, false, 0, Inventory_Send);
 }
+
 void Inventory_delete(entity e) { delete(e.inventory); }
 void Inventory_update(entity e) { e.inventory.SendFlags = 0xFFFFFF; }
 
+void Inventory_pickupitem(Pickup this, entity player)
+{
+       //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);
+}
+
 void Inventory_clear(entity store)
 {
     // NOTE: you will need to perform Inventory_update after this to update the storage entity