X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ft_items.qc;fp=qcsrc%2Fcommon%2Ft_items.qc;h=bd7885d41f5273121d7956b968d2b221b2ee7211;hb=a581da90dc5d6973de9f394bce71da9b33b55f13;hp=df3bb9b521d3ae4a43046513e330fa0cfc138de4;hpb=265179b9de7cd25a2c4375434b6b9568e362c866;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index df3bb9b52..bd7885d41 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -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)