From e8ba610b30fdd6c11b281af0afc4ccdc53082108 Mon Sep 17 00:00:00 2001 From: AriosJentu Date: Sat, 17 Aug 2019 23:11:22 +1000 Subject: [PATCH] Add condition for weapon in FilterItem --- .../common/mutators/mutator/unlimitedammo/sv_unlimitedammo.qc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.2