If the player has enough ammo already, don't pick up the weapon when g_weapon_stay...
authorMario <mario.mario@y7mail.com>
Fri, 6 Mar 2020 21:19:25 +0000 (07:19 +1000)
committerMario <mario.mario@y7mail.com>
Fri, 6 Mar 2020 21:19:25 +0000 (07:19 +1000)
qcsrc/common/t_items.qc

index df3bb9b..bd7885d 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)