- fixed: For an initial weapon pickup, sv_unlimited_pickup wasn't checked for the included ammo.

This commit is contained in:
Christoph Oelckers 2018-12-21 08:59:37 +01:00 committed by drfrag
parent fdd6e3cec9
commit 3291cecad9

View file

@ -717,10 +717,10 @@ class Weapon : StateProvider
ammoitem.Amount = MIN (amount, ammoitem.MaxAmount);
ammoitem.AttachToOwner (other);
}
else if (ammoitem.Amount < ammoitem.MaxAmount)
else if (ammoitem.Amount < ammoitem.MaxAmount || sv_unlimited_pickup)
{
ammoitem.Amount += amount;
if (ammoitem.Amount > ammoitem.MaxAmount)
if (ammoitem.Amount > ammoitem.MaxAmount && !sv_unlimited_pickup)
{
ammoitem.Amount = ammoitem.MaxAmount;
}