- 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
parent 789941f24d
commit 9fab5f3b2c

View file

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