]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix bug with weapon_defaultspawn function when change FilterItem in mutator AriosJentu/UnlimitedAmmo
authorAriosJentu <darthpoezd@gmail.com>
Sat, 17 Aug 2019 13:53:01 +0000 (23:53 +1000)
committerAriosJentu <darthpoezd@gmail.com>
Sat, 17 Aug 2019 13:53:01 +0000 (23:53 +1000)
qcsrc/common/mutators/mutator/unlimitedammo/sv_unlimitedammo.qc

index af11bc37c6584b8bcd3821855ffb511c39e7fe4b..d707c063e4fef7956ff8a9fdf8400d0220f92b3e 100644 (file)
@@ -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