X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fitems%2Fitem%2Fpickup.qc;h=b5944fc0a3def7d7235f09bfc66e6ad33f2fb11e;hb=1b0decb9afb829407eae763b3053a122e2ae3de6;hp=ade99c543aeacb710cabd4b9194d5de7bd6fc753;hpb=c89dfaa4d0342b98c320621557973a65114fbdf4;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/items/item/pickup.qc b/qcsrc/common/items/item/pickup.qc index ade99c543..b5944fc0a 100644 --- a/qcsrc/common/items/item/pickup.qc +++ b/qcsrc/common/items/item/pickup.qc @@ -1,13 +1,21 @@ #include "pickup.qh" +#include #ifdef SVQC bool ITEM_HANDLE(Pickup, entity this, entity item, entity player) { - bool b = this.giveTo(this, item, 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) { - LOG_TRACEF("entity %i picked up %s\n", player, this.m_name); + LOG_DEBUGF("entity %i picked up %s", player, this.m_name); player.inventory.inv_items[this.m_id]++; Inventory_update(player); } return b; } + #endif