From: AriosJentu Date: Sat, 17 Aug 2019 13:11:22 +0000 (+1000) Subject: Add condition for weapon in FilterItem X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e8ba610b30fdd6c11b281af0afc4ccdc53082108;p=xonotic%2Fxonotic-data.pk3dir.git Add condition for weapon in FilterItem --- diff --git a/qcsrc/common/mutators/mutator/unlimitedammo/sv_unlimitedammo.qc b/qcsrc/common/mutators/mutator/unlimitedammo/sv_unlimitedammo.qc index fd0a47a57..af11bc37c 100644 --- a/qcsrc/common/mutators/mutator/unlimitedammo/sv_unlimitedammo.qc +++ b/qcsrc/common/mutators/mutator/unlimitedammo/sv_unlimitedammo.qc @@ -11,7 +11,8 @@ MUTATOR_HOOKFUNCTION(unlimitedammo, SetStartItems) MUTATOR_HOOKFUNCTION(unlimitedammo, FilterItem) { entity item = M_ARGV(0, entity); - if (Item_IsLoot(item) && autocvar_g_unlimitedammo_remove_loot) { + //Check is item a loot and is item a weapon + if (Item_IsLoot(item) && autocvar_g_unlimitedammo_remove_loot && item.itemdef.instanceOfWeaponPickup) { remove(item); } } \ No newline at end of file