From: AriosJentu Date: Sat, 17 Aug 2019 13:53:01 +0000 (+1000) Subject: Fix bug with weapon_defaultspawn function when change FilterItem in mutator X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=35b8f65035ec56759e053e0ced5b5161758ad76a;p=xonotic%2Fxonotic-data.pk3dir.git Fix bug with weapon_defaultspawn function when change FilterItem in mutator --- diff --git a/qcsrc/common/mutators/mutator/unlimitedammo/sv_unlimitedammo.qc b/qcsrc/common/mutators/mutator/unlimitedammo/sv_unlimitedammo.qc index af11bc37c..d707c063e 100644 --- a/qcsrc/common/mutators/mutator/unlimitedammo/sv_unlimitedammo.qc +++ b/qcsrc/common/mutators/mutator/unlimitedammo/sv_unlimitedammo.qc @@ -11,8 +11,10 @@ MUTATOR_HOOKFUNCTION(unlimitedammo, SetStartItems) MUTATOR_HOOKFUNCTION(unlimitedammo, FilterItem) { entity item = M_ARGV(0, entity); + //Check is item a loot and is item a weapon - if (Item_IsLoot(item) && autocvar_g_unlimitedammo_remove_loot && item.itemdef.instanceOfWeaponPickup) { - remove(item); + if (autocvar_g_unlimitedammo_remove_loot && Item_IsLoot(item) && item.itemdef.instanceOfWeaponPickup) { + // remove(item); //Hmm interesting, when use return true, weapon doesn't spawns, but if remove returning line, and uncomment this, it sends a lot of error when kill bot + return true; } } \ No newline at end of file