]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/t_items.qc
If the player has enough ammo already, don't pick up the weapon when g_weapon_stay...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / t_items.qc
index df3bb9b521d3ae4a43046513e330fa0cfc138de4..bd7885d41f5273121d7956b968d2b221b2ee7211 100644 (file)
@@ -735,7 +735,11 @@ bool Item_GiveAmmoTo(entity item, entity player, int res_type, float ammomax)
                        return false;
        }
        else if (g_weapon_stay == 2)
+       {
                ammomax = min(amount, ammomax);
+               if(player_amount >= ammomax)
+                       return false;
+       }
        else
                return false;
        if (amount < 0)